]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/customize/class-wp-customize-header-image-control.php
WordPress 4.7-scripts
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-header-image-control.php
index 9852de6ddc42fc414d6ac0393c3b9876eba81995..b87a7bb35a2c3e329cb0850b987dd01ac9cf5637 100644 (file)
@@ -102,10 +102,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
 
                        <# } else { #>
 
-                       <# if (data.type === 'uploaded') { #>
-                               <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
-                       <# } #>
-
                        <button type="button" class="choice thumbnail"
                                data-customize-image-value="{{{data.header.url}}}"
                                data-customize-header-image-data="{{JSON.stringify(data.header)}}">
@@ -113,6 +109,10 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
                                <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}">
                        </button>
 
+                       <# if ( data.type === 'uploaded' ) { #>
+                               <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
+                       <# } #>
+
                        <# } #>
                </script>
 
@@ -131,7 +131,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
 
                                <# } else { #>
 
-                       <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" tabindex="0"/>
+                       <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" />
 
                                <# } #>
                        <# } else { #>
@@ -166,9 +166,15 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
                $height = absint( get_theme_support( 'custom-header', 'height' ) );
                ?>
                <div class="customize-control-content">
-                       <p class="customizer-section-intro">
+                       <?php if ( current_theme_supports( 'custom-header', 'video' ) ) {
+                               echo '<span class="customize-control-title">' . $this->label . '</span>';
+                       } ?>
+                       <div class="customize-control-notifications-container"></div>
+                       <p class="customizer-section-intro customize-control-description">
                                <?php
-                               if ( $width && $height ) {
+                               if ( current_theme_supports( 'custom-header', 'video' ) ) {
+                                       _e( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, we recommend matching the size of your video.' );
+                               } elseif ( $width && $height ) {
                                        /* translators: %s: header size in pixels */
                                        printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a header size of %s pixels.' ),
                                                sprintf( '<strong>%s &times; %s</strong>', $width, $height )