| 1 | Index: wp-includes/theme.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/theme.php (revision 22275) |
|---|
| 4 | +++ wp-includes/theme.php (working copy) |
|---|
| 5 | @@ -1463,23 +1463,22 @@ |
|---|
| 6 | |
|---|
| 7 | switch ( $feature ) { |
|---|
| 8 | case 'custom-header' : |
|---|
| 9 | + if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) ) |
|---|
| 10 | + break; |
|---|
| 11 | $support = get_theme_support( 'custom-header' ); |
|---|
| 12 | - if ( isset( $support[0]['wp-head-callback'] ) ) |
|---|
| 13 | + if ( $support[0]['wp-head-callback'] ) |
|---|
| 14 | remove_action( 'wp_head', $support[0]['wp-head-callback'] ); |
|---|
| 15 | - if ( isset( $GLOBALS['custom_image_header'] ) ) { |
|---|
| 16 | - remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); |
|---|
| 17 | - unset( $GLOBALS['custom_image_header'] ); |
|---|
| 18 | - } |
|---|
| 19 | + remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); |
|---|
| 20 | + unset( $GLOBALS['custom_image_header'] ); |
|---|
| 21 | break; |
|---|
| 22 | |
|---|
| 23 | case 'custom-background' : |
|---|
| 24 | + if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) ) |
|---|
| 25 | + break; |
|---|
| 26 | $support = get_theme_support( 'custom-background' ); |
|---|
| 27 | - if ( isset( $support[0]['wp-head-callback'] ) ) |
|---|
| 28 | - remove_action( 'wp_head', $support[0]['wp-head-callback'] ); |
|---|
| 29 | - if ( isset( $GLOBALS['custom_background'] ) ) { |
|---|
| 30 | - remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); |
|---|
| 31 | - unset( $GLOBALS['custom_background'] ); |
|---|
| 32 | - } |
|---|
| 33 | + remove_action( 'wp_head', $support[0]['wp-head-callback'] ); |
|---|
| 34 | + remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); |
|---|
| 35 | + unset( $GLOBALS['custom_background'] ); |
|---|
| 36 | break; |
|---|
| 37 | } |
|---|
| 38 | |
|---|