diff --git src/wp-admin/css/customize-controls.css src/wp-admin/css/customize-controls.css
index f9ca1d7..e9ef0f2 100644
|
|
|
body { |
| 465 | 465 | margin-bottom: 18px; |
| 466 | 466 | } |
| 467 | 467 | |
| | 468 | #customize-control-header_image .uploaded button, #customize-control-header_image .default button { |
| | 469 | width: 100%; |
| | 470 | padding: 0; |
| | 471 | margin: 0; |
| | 472 | background: none; |
| | 473 | border: none; |
| | 474 | color: inherit; |
| | 475 | cursor: pointer; |
| | 476 | } |
| | 477 | |
| 468 | 478 | /* Header control: current image container */ |
| 469 | 479 | |
| 470 | 480 | #customize-control-header_image .current .container { |
diff --git src/wp-admin/custom-header.php src/wp-admin/custom-header.php
index 4a2d44c..2a6a2f3 100644
|
|
|
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> |
| 1272 | 1272 | public function get_uploaded_header_images() { |
| 1273 | 1273 | $header_images = get_uploaded_header_images(); |
| 1274 | 1274 | $timestamp_key = '_wp_attachment_custom_header_last_used_' . get_stylesheet(); |
| | 1275 | $alt_text_key = '_wp_attachment_image_alt'; |
| 1275 | 1276 | |
| 1276 | 1277 | foreach ( $header_images as &$header_image ) { |
| 1277 | | $header_image['timestamp'] = get_post_meta( $header_image['attachment_id'], $timestamp_key, true ); |
| | 1278 | $header_meta = get_post_meta( $header_image['attachment_id'] ); |
| | 1279 | $header_image['timestamp'] = isset( $header_meta[ $timestamp_key ] ) ? $header_meta[ $timestamp_key ] : ''; |
| | 1280 | $header_image['alt_text'] = isset( $header_meta[ $alt_text_key ] ) ? $header_meta[ $alt_text_key ] : ''; |
| 1278 | 1281 | } |
| 1279 | 1282 | |
| 1280 | 1283 | return $header_images; |
diff --git src/wp-includes/class-wp-customize-control.php src/wp-includes/class-wp-customize-control.php
index e55a759..0b732c6 100644
|
|
|
final class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control |
| 774 | 774 | |
| 775 | 775 | <div class="placeholder random"> |
| 776 | 776 | <div class="inner"> |
| 777 | | <span><span class="dashicons dashicons-randomize dice"></span> |
| | 777 | <button type="button"><span class="dashicons dashicons-randomize dice"></span> |
| 778 | 778 | <# if ( data.type === 'uploaded' ) { #> |
| 779 | 779 | <?php _e( 'Randomize uploaded headers' ); ?> |
| 780 | 780 | <# } else if ( data.type === 'default' ) { #> |
| 781 | 781 | <?php _e( 'Randomize suggested headers' ); ?> |
| 782 | 782 | <# } #> |
| 783 | | </span> |
| | 783 | </button> |
| 784 | 784 | </div> |
| 785 | 785 | </div> |
| 786 | 786 | |
| 787 | 787 | <# } else { #> |
| 788 | 788 | |
| 789 | 789 | <# if (data.type === 'uploaded') { #> |
| 790 | | <div class="dashicons dashicons-no close"></div> |
| | 790 | <div class="dashicons dashicons-no close"></div> |
| 791 | 791 | <# } #> |
| 792 | 792 | |
| 793 | | <a href="#" class="choice thumbnail #>" |
| | 793 | <button type="button" class="choice thumbnail" |
| 794 | 794 | data-customize-image-value="{{{data.header.url}}}" |
| 795 | 795 | data-customize-header-image-data="{{JSON.stringify(data.header)}}"> |
| 796 | | <img src="{{{data.header.thumbnail_url}}}"> |
| 797 | | </a> |
| | 796 | <span class="screen-reader-text"><?php _e( 'Set image' ); ?></span> |
| | 797 | <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}"> |
| | 798 | </button> |
| 798 | 799 | |
| 799 | 800 | <# } #> |
| 800 | 801 | </script> |
| … |
… |
final class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control |
| 875 | 876 | </div> |
| 876 | 877 | <div class="actions"> |
| 877 | 878 | <?php /* translators: Hide as in hide header image via the Customizer */ ?> |
| 878 | | <a href="#" <?php echo $visibility ?> class="button remove"><?php _ex( 'Hide', 'custom header' ); ?></a> |
| | 879 | <button type="button"<?php echo $visibility ?> class="button remove"><?php _ex( 'Hide image', 'custom header' ); ?></button> |
| 879 | 880 | <?php /* translators: New as in add new header image via the Customizer */ ?> |
| 880 | | <a href="#" class="button new"><?php _ex( 'Add new', 'header image' ); ?></a> |
| | 881 | <button type="button" class="button new"><?php _ex( 'Add new image', 'header image' ); ?></button> |
| 881 | 882 | <div style="clear:both"></div> |
| 882 | 883 | </div> |
| 883 | 884 | <div class="choices"> |