Ticket #17240: 17240-random-input-fix.diff
File 17240-random-input-fix.diff, 3.5 KB (added by , 14 years ago) |
---|
-
wp-admin/custom-header.php
257 257 * @since 3.0.0 258 258 */ 259 259 function show_header_selector( $type = 'default' ) { 260 echo '<div id="available-headers">';261 260 if ( 'default' == $type ) { 262 261 $headers = $this->default_headers; 263 262 } else { … … 265 264 $type = 'uploaded'; 266 265 } 267 266 267 if ( 1 < count( $headers ) ) { 268 echo '<div class="random-header">'; 269 echo '<label><input name="default-header" type="radio" value="random-' . $type . '-image"' . checked( is_random_header_image( $type ), true, false ) . ' />'; 270 echo __( '<strong>Random:</strong> Show a different image on each page.' ); 271 echo '</label>'; 272 echo '</div>'; 273 } 274 275 echo '<div class="available-headers">'; 268 276 foreach ( $headers as $header_key => $header ) { 269 277 $header_thumbnail = $header['thumbnail_url']; 270 278 $header_url = $header['url']; … … 277 285 echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>'; 278 286 echo '</div>'; 279 287 } 280 if ( 1 < count( $headers ) ) {281 echo '<div class="default-header">';282 echo '<label><input name="default-header" type="radio" value="random-' . $type . '-image"' . checked( is_random_header_image( $type ), true, false ) . ' />';283 echo __( '<strong>Random:</strong> Show a different image on each page.' );284 echo '</label>';285 echo '</div>';286 }287 288 echo '<div class="clear"></div></div>'; 288 289 } 289 290 … … 524 525 <tr valign="top"> 525 526 <th scope="row"><?php _e( 'Uploaded Images' ); ?></th> 526 527 <td> 527 <p><?php _e( 'You can use one of your previously uploaded headers.' ) ?></p>528 <p><?php _e( 'You can choose one of your previously uploaded headers, or show a random one.' ) ?></p> 528 529 <?php 529 530 $this->show_header_selector( 'uploaded' ); 530 531 ?> … … 536 537 <th scope="row"><?php _e( 'Default Images' ); ?></th> 537 538 <td> 538 539 <?php if ( current_theme_supports( 'custom-header-uploads' ) ) : ?> 539 <p><?php _e( 'If you don‘t want to upload your own image, you can use one of these cool headers .' ) ?></p>540 <p><?php _e( 'If you don‘t want to upload your own image, you can use one of these cool headers, or show a random one.' ) ?></p> 540 541 <?php else: ?> 541 <p><?php _e( 'You can use one of these cool headers .' ) ?>542 <p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ) ?></p> 542 543 <?php endif; ?> 543 544 <?php 544 545 $this->show_header_selector( 'default' ); -
wp-admin/css/wp-admin.dev.css
3878 3878 font-size: 11px; 3879 3879 } 3880 3880 3881 .appearance_page_custom-header #available-headers .default-header {3881 .appearance_page_custom-header .available-headers .default-header { 3882 3882 float: left; 3883 3883 margin: 0 20px 20px 0; 3884 3884 } 3885 3885 3886 .appearance_page_custom-header #available-headers label input { 3886 .appearance_page_custom-header .random-header { 3887 clear: both; 3888 margin: 0 20px 20px 0; 3889 vertical-align: middle; 3890 } 3891 3892 .appearance_page_custom-header .available-headers label input, 3893 .appearance_page_custom-header .random-header label input { 3887 3894 margin-right: 10px; 3888 3895 } 3889 3896 3890 .appearance_page_custom-header #available-headers label img {3897 .appearance_page_custom-header .available-headers label img { 3891 3898 vertical-align: middle; 3892 3899 } 3893 3900