Use the function argument instead of the $post global in get_the_post_format_image(). props kovshenin. fixes #24003.

git-svn-id: https://develop.svn.wordpress.org/trunk@23938 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2013-04-09 16:28:09 +00:00
parent c436d61d37
commit c579fc339b

View File

@@ -2376,7 +2376,7 @@ function get_the_post_format_image( $attached_size = 'full', &$post = null ) {
return $post->format_content;
}
$medias = get_attached_images();
$medias = get_attached_images( $post->ID );
if ( ! empty( $medias ) ) {
$media = reset( $medias );
$sizes = get_intermediate_image_sizes();