123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?php
- function twentyfourteen_custom_header_setup() {
-
- add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
- 'default-text-color' => 'fff',
- 'width' => 1260,
- 'height' => 240,
- 'flex-height' => true,
- 'wp-head-callback' => 'twentyfourteen_header_style',
- 'admin-head-callback' => 'twentyfourteen_admin_header_style',
- 'admin-preview-callback' => 'twentyfourteen_admin_header_image',
- ) ) );
- }
- add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
- if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
- function twentyfourteen_header_style() {
- $text_color = get_header_textcolor();
-
- if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
- return;
-
- ?>
- <style type="text/css" id="twentyfourteen-header-css">
- <?php
-
- if ( ! display_header_text() ) :
- ?>
- .site-title,
- .site-description {
- clip: rect(1px 1px 1px 1px);
- clip: rect(1px, 1px, 1px, 1px);
- position: absolute;
- }
- <?php
-
- elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
- ?>
- .site-title a {
- color:
- }
- <?php endif; ?>
- </style>
- <?php
- }
- endif;
- if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
- function twentyfourteen_admin_header_style() {
- ?>
- <style type="text/css" id="twentyfourteen-admin-header-css">
- .appearance_page_custom-header
- background-color:
- border: none;
- max-width: 1260px;
- min-height: 48px;
- }
-
- font-family: Lato, sans-serif;
- font-size: 18px;
- line-height: 48px;
- margin: 0 0 0 30px;
- }
-
- color:
- text-decoration: none;
- }
-
- vertical-align: middle;
- }
- </style>
- <?php
- }
- endif;
- if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
- function twentyfourteen_admin_header_image() {
- ?>
- <div id="headimg">
- <?php if ( get_header_image() ) : ?>
- <img src="<?php header_image(); ?>" alt="">
- <?php endif; ?>
- <h1 class="displaying-header-text"><a id="name"<?php echo sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
- </div>
- <?php
- }
- endif; // twentyfourteen_admin_header_image
|