Ticket #21905: 21905.diff
File 21905.diff, 1.4 KB (added by , 12 years ago) |
---|
-
wp-includes/theme.php
1464 1464 switch ( $feature ) { 1465 1465 case 'custom-header' : 1466 1466 $support = get_theme_support( 'custom-header' ); 1467 if ( $support[0]['wp-head-callback'])1467 if ( isset( $support[0]['wp-head-callback'] ) ) 1468 1468 remove_action( 'wp_head', $support[0]['wp-head-callback'] ); 1469 remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); 1470 unset( $GLOBALS['custom_image_header'] ); 1469 if ( isset( $GLOBALS['custom_image_header'] ) ) { 1470 remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); 1471 unset( $GLOBALS['custom_image_header'] ); 1472 } 1471 1473 break; 1472 1474 1473 1475 case 'custom-background' : 1474 1476 $support = get_theme_support( 'custom-background' ); 1475 remove_action( 'wp_head', $support[0]['wp-head-callback'] ); 1476 remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); 1477 unset( $GLOBALS['custom_background'] ); 1477 if ( isset( $support[0]['wp-head-callback'] ) ) 1478 remove_action( 'wp_head', $support[0]['wp-head-callback'] ); 1479 if ( isset( $GLOBALS['custom_background'] ) ) { 1480 remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); 1481 unset( $GLOBALS['custom_background'] ); 1482 } 1478 1483 break; 1479 1484 } 1480 1485