- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwelve/inc/custom-header.php
r36709 r42343 55 55 function twentytwelve_custom_header_fonts() { 56 56 $font_url = twentytwelve_get_font_url(); 57 if ( ! empty( $font_url ) ) 57 if ( ! empty( $font_url ) ) { 58 58 wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); 59 } 59 60 } 60 61 add_action( 'admin_print_styles-appearance_page_custom-header', 'twentytwelve_custom_header_fonts' ); … … 71 72 72 73 // If no custom options for text are set, let's bail 73 if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) 74 if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) { 74 75 return; 76 } 75 77 76 78 // If we get this far, we have custom styles. … … 79 81 <?php 80 82 // Has the text been hidden? 81 if ( ! display_header_text() ) :83 if ( ! display_header_text() ) : 82 84 ?> 83 .site-title,84 .site-description {85 position: absolute;86 clip: rect(1px 1px 1px 1px); /* IE7 */87 clip: rect(1px, 1px, 1px, 1px);88 }85 .site-title, 86 .site-description { 87 position: absolute; 88 clip: rect(1px 1px 1px 1px); /* IE7 */ 89 clip: rect(1px, 1px, 1px, 1px); 90 } 89 91 <?php 90 // If the user has set a custom color for the text, use that.92 // If the user has set a custom color for the text, use that. 91 93 else : 92 94 ?> … … 156 158 <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> 157 159 <h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2> 158 <?php $header_image = get_header_image(); 159 if ( ! empty( $header_image ) ) : ?> 160 <?php 161 $header_image = get_header_image(); 162 if ( ! empty( $header_image ) ) : 163 ?> 160 164 <img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" /> 161 165 <?php endif; ?> 162 166 </div> 163 <?php } 167 <?php 168 }
Note: See TracChangeset
for help on using the changeset viewer.