From 8eeafd948eda76ca470f4540a508a4a557cc2a1a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Oct 2011 15:11:49 +0000 Subject: [PATCH] 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: https://develop.svn.wordpress.org/trunk@19029 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post-thumbnail-template.php | 1 - 1 file changed, 1 deletion(-) diff --git a/wp-includes/post-thumbnail-template.php b/wp-includes/post-thumbnail-template.php index 1377cc11b8..65a517266a 100644 --- a/wp-includes/post-thumbnail-template.php +++ b/wp-includes/post-thumbnail-template.php @@ -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 ); }