mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-20 15:21:28 +01:00
Customize: Only add custom-background
to body_class()
if the current theme supports custom background.
Props wido, swissspidy, ocean90, Mte90. Fixes #38168. Built from https://develop.svn.wordpress.org/trunk@45088 git-svn-id: http://core.svn.wordpress.org/trunk@44897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8b8994336
commit
3f3593aa6c
@ -773,7 +773,8 @@ function get_body_class( $class = '' ) {
|
|||||||
$classes[] = 'no-customize-support';
|
$classes[] = 'no-customize-support';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() ) {
|
if ( current_theme_supports( 'custom-background' )
|
||||||
|
&& ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() ) ) {
|
||||||
$classes[] = 'custom-background';
|
$classes[] = 'custom-background';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2730,7 +2730,9 @@ function _remove_theme_support( $feature ) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$support = get_theme_support( 'custom-background' );
|
$support = get_theme_support( 'custom-background' );
|
||||||
|
if ( isset( $support[0]['wp-head-callback'] ) ) {
|
||||||
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
|
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
|
||||||
|
}
|
||||||
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
|
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
|
||||||
unset( $GLOBALS['custom_background'] );
|
unset( $GLOBALS['custom_background'] );
|
||||||
break;
|
break;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.2-beta1-45087';
|
$wp_version = '5.2-beta1-45088';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user