Properly check if the custom header/background has been initialized. fixes #23170. see #22246.

git-svn-id: https://develop.svn.wordpress.org/trunk@23367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-02-01 20:33:27 +00:00
parent a873f4acdb
commit 35453dc623
1 changed files with 2 additions and 2 deletions

View File

@ -1489,7 +1489,7 @@ function _remove_theme_support( $feature ) {
switch ( $feature ) { switch ( $feature ) {
case 'custom-header' : case 'custom-header' :
if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) ) if ( ! did_action( 'wp_loaded' ) )
break; break;
$support = get_theme_support( 'custom-header' ); $support = get_theme_support( 'custom-header' );
if ( $support[0]['wp-head-callback'] ) if ( $support[0]['wp-head-callback'] )
@ -1499,7 +1499,7 @@ function _remove_theme_support( $feature ) {
break; break;
case 'custom-background' : case 'custom-background' :
if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) ) if ( ! did_action( 'wp_loaded' ) )
break; break;
$support = get_theme_support( 'custom-background' ); $support = get_theme_support( 'custom-background' );
remove_action( 'wp_head', $support[0]['wp-head-callback'] ); remove_action( 'wp_head', $support[0]['wp-head-callback'] );