mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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
This commit is contained in:
parent
2b6b7c0235
commit
aaae4e9df0
@ -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 {
|
||||
}
|
||||
?>
|
||||
<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
|
||||
<?php if ( get_background_image() ) { ?>
|
||||
<?php if ( $background_image_thumb ) { ?>
|
||||
<img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" /><br />
|
||||
<img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" />
|
||||
<?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.
|
||||
|
Loading…
Reference in New Issue
Block a user