-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
It's a mistake to have this in here. Should be done more explicitly somewhere else. Needs to be deprecated to be sure removing it doesn't break anything.
add_filter('the_seo_framework_og_image_args', [$this, 'useFeaturedImage']); |
wp-theme-init/src/ThemeInit/Plugins/SEOFramework.php
Lines 25 to 38 in a46d10c
public function useFeaturedImage($args) | |
{ | |
global $wp_query; | |
if (is_archive()) { | |
foreach ($wp_query->posts as $post) { | |
if (has_post_thumbnail($post->ID)) { | |
$thumbnail_id = get_post_thumbnail_id($post->ID); | |
$args['image'] = wp_get_attachment_image_src($thumbnail_id, [1000, 1000])[0]; | |
break; | |
} | |
} | |
} | |
return $args; | |
} |
Metadata
Metadata
Assignees
Labels
No labels