'ffffff', 'width' => 960, 'height' => 180, 'flex-height' => true, 'wp-head-callback' => 'suits_header_style', 'admin-head-callback' => 'suits_admin_header_style', 'admin-preview-callback' => 'suits_admin_header_image', ) ) ); } add_action( 'after_setup_theme', 'suits_custom_header_setup' ); /** * Loads our special font CSS files. * * @since Suits 1.0 */ function suits_custom_header_fonts() { wp_enqueue_style( 'suits-fonts', suits_fonts_url(), array(), null ); } add_action( 'admin_print_styles-appearance_page_custom-header', 'suits_custom_header_fonts' ); /** * Styles the header text displayed on the blog. * * get_header_textcolor() options: Hide text (returns 'blank'), or any hex value. * * @since Suits 1.0 */ function suits_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 Suits 1.0 */ function suits_admin_header_style() { $header_image = get_header_image(); ?> Header admin panel. * This callback overrides the default markup displayed there. * * @since Suits 1.0 */ function suits_admin_header_image() { $header = ''; $style = ''; $header_image = get_header_image(); $text_color = get_header_textcolor(); if ( ! empty( $header_image ) ) $header = ' style="background: url(' . $header_image . ') no-repeat scroll top;"'; if ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) $style = ' style="color: #' . $text_color . ';"'; ?>
>