Ticket #15926: 15926.2.diff
File 15926.2.diff, 4.5 KB (added by , 12 years ago) |
---|
-
wp-includes/theme.php
1057 1057 'thumbnail_url' => '', 1058 1058 'width' => get_theme_support( 'custom-header', 'width' ), 1059 1059 'height' => get_theme_support( 'custom-header', 'height' ), 1060 'alt' => get_theme_mod( 'header_alt_text' ), 1060 1061 ); 1061 1062 return (object) wp_parse_args( $data, $default ); 1062 1063 } -
wp-content/themes/twentyten/header.php
87 87 if ( function_exists( 'get_custom_header' ) ) { 88 88 $header_image_width = get_custom_header()->width; 89 89 $header_image_height = get_custom_header()->height; 90 $header_image_alt = get_custom_header()->alt; 90 91 } else { 91 92 $header_image_width = HEADER_IMAGE_WIDTH; 92 93 $header_image_height = HEADER_IMAGE_HEIGHT; 94 $header_image_alt = ''; 93 95 } 94 96 ?> 95 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt=" " />97 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="<?php echo esc_attr( $header_image_alt ); ?>" /> 96 98 <?php endif; ?> 97 99 </div><!-- #branding --> 98 100 -
wp-content/themes/twentytwelve/header.php
47 47 48 48 <?php $header_image = get_header_image(); 49 49 if ( ! empty( $header_image ) ) : ?> 50 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt=" " /></a>50 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_custom_header()->alt ); ?>" /></a> 51 51 <?php endif; ?> 52 52 </header><!-- #masthead --> 53 53 -
wp-content/themes/twentyeleven/header.php
102 102 if ( function_exists( 'get_custom_header' ) ) { 103 103 $header_image_width = get_custom_header()->width; 104 104 $header_image_height = get_custom_header()->height; 105 $header_image_alt = get_custom_header()->alt; 105 106 } else { 106 107 $header_image_width = HEADER_IMAGE_WIDTH; 107 108 $header_image_height = HEADER_IMAGE_HEIGHT; 109 $header_image_alt = ''; 108 110 } 109 111 ?> 110 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt=" " />112 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="<?php echo esc_attr( $header_image_alt ); ?>" /> 111 113 <?php endif; // end check for featured image or standard header ?> 112 114 </a> 113 115 <?php endif; // end check for removed header image ?> -
wp-admin/custom-header.php
202 202 203 203 $this->updated = true; 204 204 205 if ( isset( $_POST['alt-text'] ) ) { 206 check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); 207 set_theme_mod( 'header_alt_text', esc_html( sanitize_text_field( strip_tags( stripslashes( $_POST['alt-text'] ) ) ) ) ); 208 } 209 205 210 if ( isset( $_POST['resetheader'] ) ) { 206 211 check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); 207 212 $this->reset_header_image(); … … 626 631 </p> 627 632 </td> 628 633 </tr> 634 <tr valign="top"> 635 <th scope="row"><?php _e( 'Alternative Text' ); ?></th> 636 <td> 637 <input type="text" name="alt-text" class="regular-text" value="<?php echo esc_attr( get_theme_mod( 'header_alt_text' ) ); ?>" /> 638 </td> 639 </tr> 629 640 </tbody> 630 641 </table> 631 642 <?php endif;