From c436d61d37d50715ce5aadfc27dd271c1b0bd6e3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 9 Apr 2013 13:42:53 +0000 Subject: [PATCH] Consistently use the function argument instead of the $post global in get_the_post_format_media(). props kovshenin. fixes #24003. git-svn-id: https://develop.svn.wordpress.org/trunk@23937 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index f62bc0b270..fed01799b8 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -2045,7 +2045,7 @@ function get_the_post_format_media( $type, &$post = null ) { $count = 1; - if ( has_post_format( $type ) ) { + if ( has_post_format( $type, $post ) ) { $meta = get_post_format_meta( $post->ID ); if ( ! empty( $meta[$type] ) ) { if ( is_integer( $meta[$type] ) ) { @@ -2100,7 +2100,7 @@ function get_the_post_format_media( $type, &$post = null ) { return $post->format_content; } - $medias = call_user_func( 'get_attached_' . $type ); + $medias = call_user_func( 'get_attached_' . $type, $post->ID ); if ( ! empty( $medias ) ) { $media = reset( $medias ); $url = wp_get_attachment_url( $media->ID );