use get_post only for checking post_content

This commit is contained in:
Robin Cornett
2014-12-31 11:00:36 -05:00
parent 6221d8d0a9
commit f29cfcba9b
@@ -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 ) {