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:
parent
0cf4b02a4f
commit
09317ba345
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue