'220e10', 'default-image' => '%s/images/headers/circle.png', // Set height and width, with a maximum value for the width. 'height' => 230, 'width' => 1600, // Callbacks for styling the header and the admin preview. 'wp-head-callback' => 'booster_header_style', 'admin-head-callback' => 'booster_admin_header_style', 'admin-preview-callback' => 'booster_admin_header_image', ); add_theme_support( 'custom-header', $booster_args ); /* * Default custom headers packaged with the theme. * %s is a placeholder for the theme template directory URI. */ register_default_headers( array( 'circle' => array( 'url' => '%s/images/headers/circle.png', 'thumbnail_url' => '%s/images/headers/circle-thumbnail.png', 'description' => _x( 'Circle', 'header image description', 'booster' ) ), 'diamond' => array( 'url' => '%s/images/headers/diamond.png', 'thumbnail_url' => '%s/images/headers/diamond-thumbnail.png', 'description' => _x( 'Diamond', 'header image description', 'booster' ) ), 'star' => array( 'url' => '%s/images/headers/star.png', 'thumbnail_url' => '%s/images/headers/star-thumbnail.png', 'description' => _x( 'Star', 'header image description', 'booster' ) ), ) ); } add_action( 'after_setup_theme', 'booster_custom_header_setup', 11 ); /** * Load our special font CSS files. */ function booster_custom_header_fonts() { // Add Source Sans Pro and Bitter fonts. wp_enqueue_style( 'booster-fonts', booster_font_url(), array(), null ); // Add Genericons font. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '2.09' ); } add_action( 'admin_print_styles-appearance_page_custom-header', 'booster_custom_header_fonts' ); /** * Style the header text displayed on the blog. */ function booster_header_style() { $booster_header_image = get_header_image(); $booster_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if ( empty( $booster_header_image ) && $booster_text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) return; // If we get this far, we have custom styles. ?> Header admin panel. */ function booster_admin_header_style() { $booster_header_image = get_header_image(); ?> Header admin panel. * */ function booster_admin_header_image() { ?>