From aaae4e9df098ad5a12e43fd28cf1e37886f5b9cf Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 10 Jan 2015 20:44:22 +0000 Subject: [PATCH] Since `get_theme_mod()` returns `false` on failure, `$background_image_thumb` can be set to it and checked instead of calling `get_background_image()` 3 times in `Custom_Background->admin_page()`. See #30799. Built from https://develop.svn.wordpress.org/trunk@31129 git-svn-id: http://core.svn.wordpress.org/trunk@31110 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/custom-background.php | 7 ++++--- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index 0c515c22f9..cbc96bc396 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -278,8 +278,9 @@ class Custom_Background { if ( $bgcolor = get_background_color() ) $background_styles .= 'background-color: #' . $bgcolor . ';'; - if ( get_background_image() ) { - $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', get_background_image() ) ) ) ); + $background_image_thumb = get_background_image(); + if ( $background_image_thumb ) { + $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', $background_image_thumb ) ) ) ); // Background-image URL must be single quote, see below. $background_styles .= ' background-image: url(\'' . $background_image_thumb . '\');' @@ -288,7 +289,7 @@ class Custom_Background { } ?>
- +
diff --git a/wp-includes/version.php b/wp-includes/version.php index 44dd4b9f20..d286c39bc2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31128'; +$wp_version = '4.2-alpha-31129'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.