Make WordPress Core


Ignore:
Timestamp:
11/25/2014 03:11:11 PM (10 years ago)
Author:
iandstewart
Message:

Twenty Fifteen: remove unneeded custom header admin callbacks.

Props philiparthurmoore, fixes #30432.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/inc/custom-header.php

    r30564 r30567  
    1212 *
    1313 * @uses twentyfifteen_header_style()
    14  * @uses twentyfifteen_admin_header_image()
    1514 */
    1615function twentyfifteen_custom_header_setup() {
     
    3130     *     @type string $wp-head-callback       Callback function used to styles the header image and text
    3231     *                                          displayed on the blog.
    33      *     @type string $admin-preview-callback Callback function used to create the custom header markup in
    34      *                                          the Appearance > Header screen.
    3532     * }
    3633     */
     
    4037        'height'                 => 1300,
    4138        'wp-head-callback'       => 'twentyfifteen_header_style',
    42         'admin-preview-callback' => 'twentyfifteen_admin_header_image',
    4339    ) ) );
    4440}
     
    173169}
    174170endif; // twentyfifteen_header_style
    175 
    176 if ( ! function_exists( 'twentyfifteen_admin_header_image' ) ) :
    177 /**
    178  * Custom header image markup displayed on the Appearance > Header admin panel.
    179  *
    180  * @since Twenty Fifteen 1.0
    181  * @see twentyfifteen_custom_header_setup().
    182  */
    183 function twentyfifteen_admin_header_image() {
    184     $style                   = sprintf( ' style="color: #%s;"', esc_attr( get_header_textcolor() ) );
    185     $color_scheme            = twentyfifteen_get_color_scheme();
    186     $header_background_color = get_theme_mod( 'header_background_color', $color_scheme[1] );
    187 ?>
    188     <div id="headimg" style="background-image: url(<?php header_image(); ?>); background-color: <?php echo esc_attr( $header_background_color ); ?>;">
    189         <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
    190         <div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
    191     </div>
    192 <?php
    193 }
    194 endif; // twentyfifteen_admin_header_image
    195171
    196172/**
     
    375351}
    376352add_action( 'wp_enqueue_scripts', 'twentyfifteen_sidebar_text_color_css', 11 );
    377 
    378 /**
    379  * Enqueue styles to admin screen for custom header display.
    380  *
    381  * @since Twenty Fifteen 1.0
    382  */
    383 function twentyfifteen_admin_fonts() {
    384     wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
    385     wp_enqueue_style( 'twentyfifteen-custom-header', get_template_directory_uri() . '/css/admin-custom-header.css', array(), '20141010' );
    386 }
    387 add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfifteen_admin_fonts' );
Note: See TracChangeset for help on using the changeset viewer.