diff --git a/src/wp-includes/post-thumbnail-template.php b/src/wp-includes/post-thumbnail-template.php index a024b1c00b..a648a6f82c 100644 --- a/src/wp-includes/post-thumbnail-template.php +++ b/src/wp-includes/post-thumbnail-template.php @@ -179,11 +179,11 @@ function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. * @param string|array $size Optional. Registered image size to retrieve the source for or a flat * array of height and width dimensions. Default 'post-thumbnail'. - * @return string Post thumbnail URL or empty string. + * @return string|false Post thumbnail URL or false if no URL is available. */ function get_the_post_thumbnail_url( $post = null, $size = 'post-thumbnail' ) { $image = wp_get_attachment_image_url( get_post_thumbnail_id( $post ), $size ); - return isset( $image ) ? $image : ''; + return isset( $image ) ? $image : false; } /**