Revert [22274]. see #22246.

git-svn-id: https://develop.svn.wordpress.org/trunk@22312 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-10-26 04:16:49 +00:00
parent e21f4c8eb5
commit 556332cee8

View File

@@ -1464,22 +1464,17 @@ function _remove_theme_support( $feature ) {
switch ( $feature ) {
case 'custom-header' :
$support = get_theme_support( 'custom-header' );
if ( isset( $support[0]['wp-head-callback'] ) )
if ( $support[0]['wp-head-callback'] )
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
if ( isset( $GLOBALS['custom_image_header'] ) ) {
remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
unset( $GLOBALS['custom_image_header'] );
}
remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
unset( $GLOBALS['custom_image_header'] );
break;
case 'custom-background' :
$support = get_theme_support( 'custom-background' );
if ( isset( $support[0]['wp-head-callback'] ) )
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
if ( isset( $GLOBALS['custom_background'] ) ) {
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
unset( $GLOBALS['custom_background'] );
}
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
unset( $GLOBALS['custom_background'] );
break;
}