mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Customize: Only add custom-background to body_class() if the current theme supports custom background.
Props wido, swissspidy, ocean90, Mte90. Fixes #38168. git-svn-id: https://develop.svn.wordpress.org/trunk@45088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -773,7 +773,8 @@ function get_body_class( $class = '' ) {
|
||||
$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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user