From adc2ba7011bc89ace9cf57a47b086a0db3f2fc3c Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Fri, 15 Mar 2013 18:03:43 +0000 Subject: [PATCH] Twenty Twelve: improve Appearance > Header styles to match front end view better -- including loading special Google Font there. Props obenland, fixes #23790. git-svn-id: http://core.svn.wordpress.org/trunk@23717 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- inc/custom-header.php | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/inc/custom-header.php b/inc/custom-header.php index d91a869e6..37a512f38 100644 --- a/inc/custom-header.php +++ b/inc/custom-header.php @@ -21,7 +21,7 @@ function twentytwelve_custom_header_setup() { $args = array( // Text color and image (empty to use none). - 'default-text-color' => '444', + 'default-text-color' => '515151', 'default-image' => '', // Set height and width, with a maximum value for the width. @@ -46,10 +46,24 @@ function twentytwelve_custom_header_setup() { } add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' ); +/** + * Loads our special font CSS file. + * + * @since Twenty Twelve 1.2 + * + * @return void + */ +function twentytwelve_custom_header_fonts() { + $font_url = twentytwelve_get_font_url(); + if ( ! empty( $font_url ) ) + wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); +} +add_action( 'admin_print_styles-appearance_page_custom-header', 'twentytwelve_custom_header_fonts' ); + /** * Styles the header text displayed on the blog. * - * get_header_textcolor() options: 444 is default, hide text (returns 'blank'), or any hex value. + * get_header_textcolor() options: 515151 is default, hide text (returns 'blank'), or any hex value. * * @since Twenty Twelve 1.0 */ @@ -96,26 +110,27 @@ function twentytwelve_admin_header_style() {