Ticket #36175: 36175.diff
File 36175.diff, 4.5 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
720 720 721 721 /* Media controls */ 722 722 723 .customize-control-media .current, 724 .customize-control-upload .current, 725 .customize-control-image .current, 726 .customize-control-background .current, 727 .customize-control-cropped_image .current, 728 .customize-control-site_icon .current, 729 .customize-control-header .current { 730 margin-bottom: 8px; 723 .customize-control-media .actions, 724 .customize-control-upload .actions, 725 .customize-control-image .actions, 726 .customize-control-background .actions, 727 .customize-control-cropped_image .actions, 728 .customize-control-site_icon .actions, 729 .customize-control-header .actions { 730 margin-top: 8px; 731 clear: both; 731 732 } 732 733 733 734 .customize-control-header .uploaded { … … 853 854 top: 8px; 854 855 } 855 856 857 .customize-control .attachment-media-view-image .remove-button { 858 position: absolute; 859 top: 4px; 860 right: 4px; 861 margin: 0; 862 padding: 0; 863 width: 30px; 864 height: 30px; 865 overflow: hidden; 866 } 867 868 .customize-control .attachment-media-view-image { 869 position: relative; 870 } 871 872 .customize-control .attachment-media-view-image .remove-button:before { 873 content: "\f158"; 874 font: 20px/1 dashicons; 875 padding: 4px; 876 position: relative; 877 top: 4px; 878 } 879 880 .customize-control .attachment-media-view-image .remove-button:hover:before { 881 color: #a00; 882 } 883 884 .customize-control .attachment-media-view-image img { 885 width: auto; 886 max-width: 100%; 887 max-height: 258px; /* Vertically constrain portrait images to avoid taking up too much space in the customizer controls pane. */ 888 min-width: 45px; /* Ensure that a clickable portion of the image remains so that it may be edited. */ 889 } 890 856 891 .customize-control-header .list .inner, 857 892 .customize-control-header .list .inner .dashicons { 858 893 top: 9px; -
src/wp-includes/customize/class-wp-customize-media-control.php
159 159 <div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}"> 160 160 <div class="thumbnail thumbnail-{{ data.attachment.type }}"> 161 161 <# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #> 162 <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt=" " />162 <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="<?php _e( 'Click to change image.' ); ?>" /> 163 163 <# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #> 164 <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt=" " />164 <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="<?php _e( 'Click to change image.' ); ?>" /> 165 165 <# } else if ( 'audio' === data.attachment.type ) { #> 166 166 <# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #> 167 167 <img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" alt="" /> … … 190 190 <p class="attachment-title">{{ data.attachment.title }}</p> 191 191 <# } #> 192 192 </div> 193 <div class="actions"> 194 <# if ( data.canUpload ) { #> 195 <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button> 196 <# if ( 'image' !== data.attachment.type ) { #> 197 <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button> 198 <# } #> 199 <div style="clear:both"></div> 200 <# } #> 201 </div> 193 202 </div> 194 203 </div> 195 204 </div> 196 <div class="actions">197 <# if ( data.canUpload ) { #>198 <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>199 <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>200 <div style="clear:both"></div>201 <# } #>202 </div>203 205 <# } else { #> 204 206 <div class="current"> 205 207 <div class="container">