Make WordPress Core


Ignore:
Timestamp:
04/01/2019 04:17:11 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Customize: Only add custom-background to body_class() if the current theme supports custom background.

Props wido, swissspidy, ocean90, Mte90.
Fixes #38168.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r44894 r45088  
    27312731            }
    27322732            $support = get_theme_support( 'custom-background' );
    2733             remove_action( 'wp_head', $support[0]['wp-head-callback'] );
     2733            if ( isset( $support[0]['wp-head-callback'] ) ) {
     2734                remove_action( 'wp_head', $support[0]['wp-head-callback'] );
     2735            }
    27342736            remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
    27352737            unset( $GLOBALS['custom_background'] );
Note: See TracChangeset for help on using the changeset viewer.