'%s/images/header.jpg', 'default-text-color' => '265e15', 'width' => 1015, 'height' => 276, 'flex-height' => true, 'header-text' => true, 'wp-head-callback' => 'mistylake_header_style', 'admin-head-callback' => 'mistylake_admin_header_style', 'admin-preview-callback' => 'mistylake_admin_header_image', ) ) ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'lake' => array( 'url' => '%s/images/header.jpg', 'thumbnail_url' => '%s/images/header-thumbnail.jpg', 'description' => _x( 'Lake', 'Header image description', 'mistylake' ) ), ) ); } add_action( 'after_setup_theme', 'mistylake_custom_header_setup' ); if ( ! function_exists( 'mistylake_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see mistylake_custom_header_setup(). */ function mistylake_header_style() { $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value if ( HEADER_TEXTCOLOR == $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * * @see mistylake_custom_header_setup(). * * @since Misty Lake 1.0 */ function mistylake_admin_header_style() { ?> Header admin panel. * * @see mistylake_custom_header_setup(). * * @since Misty Lake 1.0 */ function mistylake_admin_header_image() { $header_image = get_header_image(); $style = sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?>