'', 'default-text-color' => 'fff', 'width' => 1600, 'height' => 400, 'flex-height' => true, 'wp-head-callback' => 'nisarg_header_style', 'admin-head-callback' => 'nisarg_admin_header_style', 'admin-preview-callback' => 'nisarg_admin_header_image', ) ) ); /* * Default custom headers packaged with the theme. * %s is a placeholder for the theme template directory URI. */ register_default_headers( array( 'mountains' => array( 'url' => '%s/images/headers/mountains.png', 'thumbnail_url' => '%s/images/headers/mountains_thumbnail.png', 'description' => _x( 'food', 'header image description', 'nisarg' ), ), 'skyline' => array( 'url' => '%s/images/headers/skyline.png', 'thumbnail_url' => '%s/images/headers/skyline_thumbnail.png', 'description' => _x( 'buildings', 'header image description', 'nisarg' ), ), 'sea' => array( 'url' => '%s/images/headers/sea.png', 'thumbnail_url' => '%s/images/headers/sea_thumbnail.png', 'description' => _x( 'Wood', 'header image description', 'nisarg' ), ), 'food' => array( 'url' => '%s/images/headers/food.png', 'thumbnail_url' => '%s/images/headers/food_thumbnail.png', 'description' => _x( 'food', 'header image description', 'nisarg' ), ), ) ); } add_action( 'after_setup_theme', 'nisarg_custom_header_setup' ); if ( ! function_exists( 'nisarg_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see nisarg_custom_header_setup(). */ function nisarg_header_style() { $header_image = get_header_image(); $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if ( empty( $header_image ) && $header_text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) { return; } // If we get this far, we have custom styles. ?> Header admin panel. * * @see nisarg_custom_header_setup(). */ function nisarg_admin_header_style() { ?> Header admin panel. * * @see nisarg_custom_header_setup(). */ function nisarg_admin_header_image() { if ( 'blank' == get_header_textcolor() || '' == get_header_textcolor() ) { $style = ' style="color: #fff;"'; } else { $style = ' style="color:#' . get_header_textcolor() . ';"'; } ?>