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

git-svn-id: http://core.svn.wordpress.org/trunk@23367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-02-01 20:33:27 +00:00
parent 6cb5f510b8
commit a0c84bc523
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'] );