WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/02/2012 03:16:48 PM (8 years ago)
Author:
nacin
Message:

Require both wp-head-callback and admin-head-callback for custom header theme support. fixes #20603.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r20642 r20684  
    13481348
    13491349        $args = get_theme_support( 'custom-header' );
    1350         if ( $args[0]['wp-head-callback'] )
     1350        if ( $args[0]['wp-head-callback'] && $args[0]['admin-head-callback'] ) {
    13511351            add_action( 'wp_head', $args[0]['wp-head-callback'] );
    13521352
    1353         if ( is_admin() ) {
    1354             require_once( ABSPATH . 'wp-admin/custom-header.php' );
    1355             $custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
     1353            if ( is_admin() ) {
     1354                require_once( ABSPATH . 'wp-admin/custom-header.php' );
     1355                $custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
     1356            }
    13561357        }
    13571358    }
     
    15571558        $old_theme = wp_get_theme( $stylesheet );
    15581559
     1560       
    15591561        if ( $old_theme->exists() )
    15601562            do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme );
Note: See TracChangeset for help on using the changeset viewer.