Post Thumbnails: In `get_the_post_thumbnail_url()`, return `false` instead of empty string when no URL is available.
Fixes #33070. Built from https://develop.svn.wordpress.org/trunk@34480 git-svn-id: http://core.svn.wordpress.org/trunk@34444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
03d630d705
commit
4e9c1692b0
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34479';
|
||||
$wp_version = '4.4-alpha-34480';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue