File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 5
5
* Description: Adds Open Graph metadata to your pages
6
6
* Author: Will Norris & Matthias Pfefferle
7
7
* Author URI: https://github.com/pfefferle/wordpress-opengraph
8
- * Version: 2.0.1
8
+ * Version: 2.0.2
9
9
* License: Apache License, Version 2.0
10
10
* License URI: http://www.apache.org/licenses/LICENSE-2.0.html
11
11
* Text Domain: opengraph
21
21
22
22
// Disable strict mode by default.
23
23
defined ( 'OPENGRAPH_STRICT_MODE ' ) || define ( 'OPENGRAPH_STRICT_MODE ' , false );
24
-
24
+ // Set the maximum number of images to include in Open Graph metadata.
25
+ defined ( 'OPENGRAPH_MAX_IMAGES ' ) || define ( 'OPENGRAPH_MAX_IMAGES ' , 3 );
25
26
26
27
/**
27
28
* Add Open Graph XML prefix to <html> element.
@@ -928,7 +929,7 @@ function opengraph_max_images() {
928
929
*
929
930
* @param int $max_images The maximum number of images to include.
930
931
*/
931
- $ max_images = apply_filters ( 'opengraph_max_images ' , 3 );
932
+ $ max_images = apply_filters ( 'opengraph_max_images ' , OPENGRAPH_MAX_IMAGES );
932
933
933
934
// Max images can't be negative or zero.
934
935
if ( $ max_images <= 0 ) {
Original file line number Diff line number Diff line change 4
4
- Tags: social, opengraph, ogp, facebook
5
5
- Requires at least: 2.3
6
6
- Tested up to: 6.7
7
- - Stable tag: 2.0.1
7
+ - Stable tag: 2.0.2
8
8
- License: Apache License, 2.0
9
9
- License URI: https://www.apache.org/licenses/LICENSE-2.0.html
10
10
@@ -63,6 +63,10 @@ The plugin populates the meta 'name' attribute alongside the 'property' attribut
63
63
64
64
Project maintained on github at [ pfefferle/wordpress-opengraph] ( https://github.com/pfefferle/wordpress-opengraph ) .
65
65
66
+ ### 2.0.2 (Feb 25, 2025)
67
+
68
+ - Add a constant to easily change the max number of images to be included in the OpenGraph meta tags.
69
+
66
70
### 2.0.1 (Dec 16, 2024)
67
71
68
72
- Fixed a warning
You can’t perform that action at this time.
0 commit comments