mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-16 21:13:18 +09:00
use get_post only for checking post_content
This commit is contained in:
@@ -105,6 +105,7 @@ class Display_Featured_Image_Genesis_Common {
|
||||
// declare this last so that $item->backstretch is set.
|
||||
if ( ! is_admin() && is_singular() ) {
|
||||
$fullsize = wp_get_attachment_image_src( $image_id, 'original' );
|
||||
$post = get_post();
|
||||
$item->content = strpos( $post->post_content, 'src="' . $fullsize[0] );
|
||||
// reset backstretch image source to fallback if it exists and the featured image is being used in content.
|
||||
if ( ! empty( $item->fallback ) && false !== $item->content ) {
|
||||
|
||||
Reference in New Issue
Block a user