Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If we have not yet initialized the custom header/background, do not d…

…o extra removal in _remove_theme_support(). fixes #22246.

git-svn-id: http://core.svn.wordpress.org/trunk@22313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 2677205fba129d3b945fab5d50e3dc5e7f1e2d35 1 parent 602dd1a
@nacin nacin authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 wp-includes/theme.php
View
4 wp-includes/theme.php
@@ -1463,6 +1463,8 @@ function _remove_theme_support( $feature ) {
switch ( $feature ) {
case 'custom-header' :
+ if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) )
+ break;
$support = get_theme_support( 'custom-header' );
if ( $support[0]['wp-head-callback'] )
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
@@ -1471,6 +1473,8 @@ function _remove_theme_support( $feature ) {
break;
case 'custom-background' :
+ if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) )
+ break;
$support = get_theme_support( 'custom-background' );
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
Please sign in to comment.
Something went wrong with that request. Please try again.