diff -r cf61fcea0001 -r c7c34916027a wp/wp-content/themes/twentytwelve/inc/custom-header.php --- a/wp/wp-content/themes/twentytwelve/inc/custom-header.php Mon Oct 14 17:39:30 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,168 +0,0 @@ - '515151', - 'default-image' => '', - - // Set height and width, with a maximum value for the width. - 'height' => 250, - 'width' => 960, - 'max-width' => 2000, - - // Support flexible height and width. - 'flex-height' => true, - 'flex-width' => true, - - // Random image rotation off by default. - 'random-default' => false, - - // Callbacks for styling the header and the admin preview. - 'wp-head-callback' => 'twentytwelve_header_style', - 'admin-head-callback' => 'twentytwelve_admin_header_style', - 'admin-preview-callback' => 'twentytwelve_admin_header_image', - ); - - add_theme_support( 'custom-header', $args ); -} -add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' ); - -/** - * Load our special font CSS file. - * - * @since Twenty Twelve 1.2 - */ -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' ); - -/** - * Style the header text displayed on the blog. - * - * get_header_textcolor() options: 515151 is default, hide text (returns 'blank'), or any hex value. - * - * @since Twenty Twelve 1.0 - */ -function twentytwelve_header_style() { - $text_color = get_header_textcolor(); - - // If no custom options for text are set, let's bail - if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) { - return; - } - - // If we get this far, we have custom styles. - ?> - - Header admin panel. - * - * @since Twenty Twelve 1.0 - */ -function twentytwelve_admin_header_style() { -?> - - Header admin panel. - * - * This callback overrides the default markup displayed there. - * - * @since Twenty Twelve 1.0 - */ -function twentytwelve_admin_header_image() { - $style = 'color: #' . get_header_textcolor() . ';'; - if ( ! display_header_text() ) { - $style = 'display: none;'; - } - ?> -
-