From 78cff98ef90c8aa0927e9777647033861101fc03 Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Tue, 25 Nov 2014 15:11:11 +0000 Subject: [PATCH] Twenty Fifteen: remove unneeded custom header admin callbacks. Props philiparthurmoore, fixes #30432. git-svn-id: https://develop.svn.wordpress.org/trunk@30567 602fd350-edb4-49c9-b593-d223f7449a82 --- .../twentyfifteen/css/admin-custom-header.css | 112 ------------------ .../twentyfifteen/inc/custom-header.php | 37 +----- 2 files changed, 1 insertion(+), 148 deletions(-) diff --git a/src/wp-content/themes/twentyfifteen/css/admin-custom-header.css b/src/wp-content/themes/twentyfifteen/css/admin-custom-header.css index 878b2c3f1e..e69de29bb2 100644 --- a/src/wp-content/themes/twentyfifteen/css/admin-custom-header.css +++ b/src/wp-content/themes/twentyfifteen/css/admin-custom-header.css @@ -1,112 +0,0 @@ -/* -Theme Name: Twenty Fifteen -Description: Used to style the header image displayed on the Appearance > Header screen. -*/ - -.appearance_page_custom-header #headimg { - background: #fff no-repeat 50% 50%; - background-size: cover; - border: none; - box-sizing: border-box; - padding: 7.6923%; -} - -#headimg h1, -#desc { - color: #333; - font-family: "Noto Sans", sans-serif; -} - -#headimg h1 { - font-size: 22px; - line-height: 1.0909; - margin: 0; -} - -#headimg h1 a { - text-decoration: none; -} - -#desc { - font-size: 12px; - line-height: 1.5; - margin-top: 0.5em; - opacity: 0.7; -} - -/* Hide the header text color option */ -.appearance_page_custom-header tr.displaying-header-text, -.appearance_page_custom-header tr.displaying-header-text td, -.appearance_page_custom-header tr.displaying-header-text th { - display: none; -} - -@media screen and (min-width: 772px) { - #headimg h1 { - font-size: 29px; - line-height: 1.2069; - margin: 0; - } - - #desc { - font-size: 14px; - } -} - -@media screen and (min-width: 783px) { - #headimg h1 { - font-size: 22px; - line-height: 1.0909; - } - - #desc { - font-size: 12px; - line-height: 1.5; - margin-top: 0.5em; - } -} - -@media screen and (min-width: 1172px) { - #headimg h1 { - font-size: 29px; - line-height: 1.2069; - } - - #desc { - font-size: 14px; - } -} - -@media screen and (min-width: 1313px) { - #headimg h1 { - font-size: 32px; - line-height: 1.25; - } - - #desc { - font-size: 16px; - } -} - -@media screen and (min-width: 1383px) { - .appearance_page_custom-header #headimg { - background-position: 100% 50%; - height: 1300px; - max-width: 954px; - padding: 83px 83px 0 0; - width: 42%; - } - - #headimg h1 { - float: right; - font-size: 27px; - line-height: 1.1852; - width: 248px; - } - - #desc { - clear: right; - float: right; - width: 248px; - } -} \ No newline at end of file diff --git a/src/wp-content/themes/twentyfifteen/inc/custom-header.php b/src/wp-content/themes/twentyfifteen/inc/custom-header.php index 6ac699efa7..753c8b5e60 100644 --- a/src/wp-content/themes/twentyfifteen/inc/custom-header.php +++ b/src/wp-content/themes/twentyfifteen/inc/custom-header.php @@ -11,7 +11,6 @@ * Set up the WordPress core custom header feature. * * @uses twentyfifteen_header_style() - * @uses twentyfifteen_admin_header_image() */ function twentyfifteen_custom_header_setup() { $color_scheme = twentyfifteen_get_color_scheme(); @@ -30,8 +29,6 @@ function twentyfifteen_custom_header_setup() { * @type int $height Height in pixels of the custom header image. Default 1300. * @type string $wp-head-callback Callback function used to styles the header image and text * displayed on the blog. - * @type string $admin-preview-callback Callback function used to create the custom header markup in - * the Appearance > Header screen. * } */ add_theme_support( 'custom-header', apply_filters( 'twentyfifteen_custom_header_args', array( @@ -39,7 +36,6 @@ function twentyfifteen_custom_header_setup() { 'width' => 954, 'height' => 1300, 'wp-head-callback' => 'twentyfifteen_header_style', - 'admin-preview-callback' => 'twentyfifteen_admin_header_image', ) ) ); } add_action( 'after_setup_theme', 'twentyfifteen_custom_header_setup' ); @@ -173,26 +169,6 @@ function twentyfifteen_header_style() { } endif; // twentyfifteen_header_style -if ( ! function_exists( 'twentyfifteen_admin_header_image' ) ) : -/** - * Custom header image markup displayed on the Appearance > Header admin panel. - * - * @since Twenty Fifteen 1.0 - * @see twentyfifteen_custom_header_setup(). - */ -function twentyfifteen_admin_header_image() { - $style = sprintf( ' style="color: #%s;"', esc_attr( get_header_textcolor() ) ); - $color_scheme = twentyfifteen_get_color_scheme(); - $header_background_color = get_theme_mod( 'header_background_color', $color_scheme[1] ); -?> -
-

onclick="return false;" href="" tabindex="-1">

-
>
-
-