Twenty Fifteen: remove unneeded custom header admin callbacks.

Props philiparthurmoore, fixes #30432.


Built from https://develop.svn.wordpress.org/trunk@30567


git-svn-id: http://core.svn.wordpress.org/trunk@30556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ian Stewart 2014-11-25 15:12:22 +00:00
parent a88ec3f9de
commit cb2dcb9820
3 changed files with 2 additions and 149 deletions

View File

@ -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;
}
}

View File

@ -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] );
?>
<div id="headimg" style="background-image: url(<?php header_image(); ?>); background-color: <?php echo esc_attr( $header_background_color ); ?>;">
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
</div>
<?php
}
endif; // twentyfifteen_admin_header_image
/**
* Enqueues front-end CSS for the header background color.
*
@ -373,15 +349,4 @@ function twentyfifteen_sidebar_text_color_css() {
wp_add_inline_style( 'twentyfifteen-style', sprintf( $css, $sidebar_link_color, $sidebar_text_color, $sidebar_border_color, $sidebar_border_focus_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_sidebar_text_color_css', 11 );
/**
* Enqueue styles to admin screen for custom header display.
*
* @since Twenty Fifteen 1.0
*/
function twentyfifteen_admin_fonts() {
wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
wp_enqueue_style( 'twentyfifteen-custom-header', get_template_directory_uri() . '/css/admin-custom-header.css', array(), '20141010' );
}
add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfifteen_admin_fonts' );
add_action( 'wp_enqueue_scripts', 'twentyfifteen_sidebar_text_color_css', 11 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30566';
$wp_version = '4.1-beta2-30567';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.