'ffffff', 'default-image' => '', // Set height and width defaults. 'height' => 150, 'width' => 1000, // Set flexible height and width. 'flex-height' => true, 'flex-width' => true, // Callbacks for styling the header and the admin preview. 'wp-head-callback' => 'mckinley_header_style', 'admin-head-callback' => 'mckinley_admin_header_style', 'admin-preview-callback' => 'mckinley_admin_header_image', ); add_theme_support( 'custom-header', $args ); } add_action( 'after_setup_theme', 'mckinley_custom_header_setup' ); /** * Loads our special font CSS files. * * @since McKinley 1.0 */ function mckinley_custom_header_fonts() { $hook_suffix = null; // bug? Not sure what this is supposed to be. Adding to pass rector. if ( 'appearance_page_custom-header' != $hook_suffix ) return; wp_enqueue_style( 'mckinley_fonts' ); } add_action( 'admin_print_styles-appearance_page_custom-header', 'mckinley_custom_header_fonts' ); /** * Styles the header text displayed on the blog. * * get_header_textcolor() options: Hide text (returns 'blank'), or any hex value. * * @since McKinley 1.0 */ function mckinley_header_style() { $header_image = get_header_image(); $text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if ( empty( $header_image ) && $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) return; // If we get this far, we have custom styles. ?> Header admin panel. * * @since McKinley 1.0 */ function mckinley_admin_header_style() { $header_image = get_header_image(); ?> Header admin panel. * This callback overrides the default markup displayed there. * * @since McKinley 1.0 */ function mckinley_admin_header_image() { ?>