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

git-svn-id: http://core.svn.wordpress.org/trunk@23938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-04-09 16:28:09 +00:00
parent 0cf4b02a4f
commit 09317ba345
1 changed files with 1 additions and 1 deletions

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();