Pass $post_id arg directly to get_post_thumbnail_id() from has_post_thumbnail(). The null/get_the_ID() check is already performed at that level of the stack. see #19012.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-20 15:11:49 +00:00
parent 43eae59235
commit eb24f35c22
1 changed files with 0 additions and 1 deletions

View File

@ -18,7 +18,6 @@
* @return bool Whether post has an image attached.
*/
function has_post_thumbnail( $post_id = null ) {
$post_id = ( null === $post_id ) ? get_the_ID() : $post_id;
return (bool) get_post_thumbnail_id( $post_id );
}