File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 9
9
* License: GPLv3
10
10
* Requires at least: 5.9
11
11
* Requires PHP: 7.4.0
12
+ * Requires Plugins: autodescription
12
13
*
13
14
* @package My_The_SEO_Framework\SchemaImage
14
15
*/
@@ -21,8 +22,8 @@ function ( $graph, $args ) {
21
22
22
23
foreach ( $ graph as &$ data ) {
23
24
if ( 'WebPage ' === $ data ['@type ' ] ) {
24
- $ data ['primaryImageOfPage ' ] = My_Graph_Image::get_instant_ref ( $ args );
25
25
$ data ['image ' ] = &My_Graph_Image::get_dynamic_ref ( $ args );
26
+ $ data ['primaryImageOfPage ' ] = My_Graph_Image::get_instant_ref ( $ args );
26
27
}
27
28
}
28
29
@@ -66,8 +67,10 @@ public static function build( $args = null ) {
66
67
67
68
$ entity = [];
68
69
69
- // TODO: We'll probably turn 'social' into 'search' when this gets implemented.
70
- foreach ( \tsf ()->image ()->get_image_details ( $ args , false , 'social ' ) as $ image ) {
70
+ // TODO: We'll probably turn 'social' into 'schema' when this gets implemented.
71
+ // We should also decouple this from the My_Graph_Image object since static::$type needs to become iterably changed.
72
+ // Hence, this will probably be the first graph item that is iterable.
73
+ foreach ( \tsf ()->image ()->get_image_details ( $ args , false , 'schema ' ) as $ image ) {
71
74
$ details = [
72
75
'@id ' => static ::get_id ( $ args ),
73
76
'@type ' => &static ::$ type ,
You can’t perform that action at this time.
0 commit comments