From 4e9c1692b0d1ff8ed3e19632b1f6707319a3e39a Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 24 Sep 2015 04:38:25 +0000 Subject: [PATCH] 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 --- wp-includes/post-thumbnail-template.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/post-thumbnail-template.php b/wp-includes/post-thumbnail-template.php index a024b1c00b..a648a6f82c 100644 --- a/wp-includes/post-thumbnail-template.php +++ b/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; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index a1530abfc8..5e7376b4b0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.