Ticket #22246: 22246.2.diff
File 22246.2.diff, 1.6 KB (added by , 11 years ago) |
---|
-
wp-includes/theme.php
1463 1463 1464 1464 switch ( $feature ) { 1465 1465 case 'custom-header' : 1466 if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) ) 1467 break; 1466 1468 $support = get_theme_support( 'custom-header' ); 1467 if ( isset( $support[0]['wp-head-callback'] ))1469 if ( $support[0]['wp-head-callback'] ) 1468 1470 remove_action( 'wp_head', $support[0]['wp-head-callback'] ); 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 remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); 1472 unset( $GLOBALS['custom_image_header'] ); 1473 1473 break; 1474 1474 1475 1475 case 'custom-background' : 1476 if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) ) 1477 break; 1476 1478 $support = get_theme_support( '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 } 1479 remove_action( 'wp_head', $support[0]['wp-head-callback'] ); 1480 remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); 1481 unset( $GLOBALS['custom_background'] ); 1483 1482 break; 1484 1483 } 1485 1484