Make WordPress Core

Ticket #38168: Be_sure_that_current_theme_support_custom_background.patch

File Be_sure_that_current_theme_support_custom_background.patch, 804 bytes (added by wido, 9 years ago)

Check for current theme support custom-background

  • wp-includes/post-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    711711                $classes[] = 'no-customize-support';
    712712        }
    713713
    714         if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
     714        if ( current_theme_supports( 'custom-background' ) && (
     715                        get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) ||
     716                        get_background_image() )
     717        ) {
    715718                $classes[] = 'custom-background';
     719        }
    716720
    717721        if ( has_custom_logo() ) {
    718722                $classes[] = 'wp-custom-logo';