'000000', // Set height and width, with a maximum value for the width. 'height' => 250, 'width' => 1000, // Callbacks for styling the header and the admin preview. 'wp-head-callback' => 'avien_light_header_style', 'admin-head-callback' => 'avien_light_admin_header_style', 'admin-preview-callback' => 'avien_light_admin_header_image', ); add_theme_support( 'custom-header', $args ); } add_action( 'after_setup_theme', 'avien_light_custom_header_setup', 11 ); /** * Load our special font CSS files. * * @since Avien_Light */ function avien_light_custom_header_fonts() { // Add Source Sans Pro and Bitter fonts. wp_enqueue_style( 'avien-light-fonts', avien-light_fonts_url(), array(), null ); // Add Genericons font. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' ); } add_action( 'admin_print_styles-appearance_page_custom-header', 'avien_light_custom_header_fonts' ); /** * Style the header text displayed on the blog. * * get_header_textcolor() options: Hide text (returns 'blank'), or any hex value. * * @since Avien_Light */ function avien_light_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 Avien_Light */ function avien_light_admin_header_style() { $header_image = get_header_image(); ?> Header admin panel. * * This callback overrides the default markup displayed there. * * @since Avien_Light */ function avien_light_admin_header_image() { $style = 'color: #' . get_header_textcolor() . ';'; if ( ! display_header_text() ) { $style = 'display: none;'; } ?>