Ticket #43151: 43151.3.diff
File 43151.3.diff, 8.5 KB (added by , 6 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
1379 1379 } 1380 1380 1381 1381 .customize-control .attachment-media-view .placeholder, 1382 .customize-control .attachment-media-view .button-add-media, 1382 1383 .customize-control-header .placeholder { 1383 1384 width: 100%; 1384 1385 position: relative; … … 1390 1391 line-height: 20px; 1391 1392 } 1392 1393 1394 .customize-control .attachment-media-view .button-add-media { 1395 cursor: pointer; 1396 background-color: #edeff0; 1397 color: #32373c; 1398 } 1399 1400 .customize-control .attachment-media-view .button-add-media:hover { 1401 background-color: #fbfbfc; 1402 } 1403 1404 .customize-control .attachment-media-view .button-add-media:focus { 1405 background-color: #fbfbfc; 1406 border-style: solid; 1407 border-color: #5b9dd9; 1408 box-shadow: 0 0 3px rgba( 0, 115, 170, .8 ); 1409 /* Only visible in Windows High Contrast mode */ 1410 outline: 2px solid transparent; 1411 outline-offset: -2px; 1412 } 1413 1393 1414 .customize-control-header .inner { 1394 1415 display: none; 1395 1416 position: absolute; -
src/wp-admin/css/widgets.css
84 84 margin-right: 8px; 85 85 } 86 86 87 .media-widget-control .attachment-media-view .button-add-media, 87 88 .media-widget-control .placeholder { 88 89 border: 1px dashed #b4b9be; 89 90 box-sizing: border-box; … … 95 96 width: 100%; 96 97 } 97 98 99 .media-widget-control .attachment-media-view .button-add-media { 100 cursor: pointer; 101 background-color: #edeff0; 102 color: #32373c; 103 } 104 105 .media-widget-control .attachment-media-view .button-add-media:hover { 106 background-color: #fbfbfc; 107 } 108 109 .media-widget-control .attachment-media-view .button-add-media:focus { 110 background-color: #fbfbfc; 111 border-style: solid; 112 border-color: #5b9dd9; 113 box-shadow: 0 0 3px rgba( 0, 115, 170, .8 ); 114 /* Only visible in Windows High Contrast mode */ 115 outline: 2px solid transparent; 116 outline-offset: -2px; 117 } 118 98 119 .media-widget-control .media-widget-preview { 99 120 background: transparent; 100 121 text-align: center; -
src/wp-includes/customize/class-wp-customize-media-control.php
132 132 public function content_template() { 133 133 ?> 134 134 <# 135 var selectButtonId = _.uniqueId( 'customize-media-control-button-' );136 135 var descriptionId = _.uniqueId( 'customize-media-control-description-' ); 137 136 var describedByAttr = data.description ? ' aria-describedby="' + descriptionId + '" ' : ''; 138 137 #> 139 138 <# if ( data.label ) { #> 140 < label class="customize-control-title" for="{{ selectButtonId }}">{{ data.label }}</label>139 <span class="customize-control-title">{{ data.label }}</span> 141 140 <# } #> 142 141 <div class="customize-control-notifications-container"></div> 143 142 <# if ( data.description ) { #> … … 182 181 <div class="actions"> 183 182 <# if ( data.canUpload ) { #> 184 183 <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button> 185 <button type="button" class="button upload-button control-focus" id="{{ selectButtonId }}"{{{ describedByAttr }}}>{{ data.button_labels.change }}</button>184 <button type="button" class="button upload-button control-focus" {{{ describedByAttr }}}>{{ data.button_labels.change }}</button> 186 185 <# } #> 187 186 </div> 188 187 </div> 189 188 <# } else { #> 190 189 <div class="attachment-media-view"> 191 < div class="placeholder">192 {{ data.button_labels.placeholder }}193 < /div>190 <# if ( data.canUpload ) { #> 191 <button type="button" class="upload-button button-add-media" {{{ describedByAttr }}}>{{ data.button_labels.select }}</button> 192 <# } #> 194 193 <div class="actions"> 195 194 <# if ( data.defaultAttachment ) { #> 196 195 <button type="button" class="button default-button">{{ data.button_labels['default'] }}</button> 197 196 <# } #> 198 <# if ( data.canUpload ) { #>199 <button type="button" class="button upload-button" id="{{ selectButtonId }}" {{{ describedByAttr }}}>{{ data.button_labels.select }}</button>200 <# } #>201 197 </div> 202 198 </div> 203 199 <# } #> … … 241 237 case 'image': 242 238 return array( 243 239 'select' => __( 'Select image' ), 240 'site_icon' => __( 'Select site icon' ), 244 241 'change' => __( 'Change image' ), 245 242 'default' => __( 'Default' ), 246 243 'remove' => __( 'Remove' ), -
src/wp-includes/customize/class-wp-customize-site-icon-control.php
47 47 */ 48 48 public function content_template() { 49 49 ?> 50 <label for="{{ data.settings['default'] }}-button"> 51 <# if ( data.label ) { #> 52 <span class="customize-control-title">{{ data.label }}</span> 53 <# } #> 54 <# if ( data.description ) { #> 55 <span class="description customize-control-description">{{{ data.description }}}</span> 56 <# } #> 57 </label> 50 <# if ( data.label ) { #> 51 <span class="customize-control-title">{{ data.label }}</span> 52 <# } #> 53 <# if ( data.description ) { #> 54 <span class="description customize-control-description">{{{ data.description }}}</span> 55 <# } #> 58 56 59 57 <# if ( data.attachment && data.attachment.id ) { #> 60 58 <div class="attachment-media-view"> … … 74 72 <div class="actions"> 75 73 <# if ( data.canUpload ) { #> 76 74 <button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button> 77 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>75 <button type="button" class="button upload-button"><?php echo $this->button_labels['change']; ?></button> 78 76 <# } #> 79 77 </div> 80 78 </div> 81 79 <# } else { #> 82 80 <div class="attachment-media-view"> 83 < div class="placeholder">84 < ?php echo $this->button_labels['placeholder']; ?>85 < /div>81 <# if ( data.canUpload ) { #> 82 <button type="button" class="upload-button button-add-media"><?php echo $this->button_labels['site_icon']; ?></button> 83 <# } #> 86 84 <div class="actions"> 87 85 <# if ( data.defaultAttachment ) { #> 88 86 <button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button> 89 87 <# } #> 90 <# if ( data.canUpload ) { #>91 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>92 <# } #>93 88 </div> 94 89 </div> 95 90 <# } #> -
src/wp-includes/widgets/class-wp-widget-media-gallery.php
228 228 </ul> 229 229 <# } else { #> 230 230 <div class="attachment-media-view"> 231 < p class="placeholder"><?php echo esc_html( $this->l10n['no_media_selected'] ); ?></p>231 <button type="button" class="placeholder button-add-media"><?php echo esc_html( $this->l10n['add_media'] ); ?></button> 232 232 </div> 233 233 <# } #> 234 234 </script> -
src/wp-includes/widgets/class-wp-widget-media.php
411 411 </p> 412 412 <div class="media-widget-preview <?php echo esc_attr( $this->id_base ); ?>"> 413 413 <div class="attachment-media-view"> 414 <div class="placeholder"><?php echo esc_html( $this->l10n['no_media_selected'] ); ?></div> 414 <button type="button" class="select-media button-add-media not-selected"> 415 <?php echo esc_html( $this->l10n['add_media'] ); ?> 416 </button> 415 417 </div> 416 418 </div> 417 419 <p class="media-widget-buttons"> … … 423 425 <?php echo esc_html( $this->l10n['replace_media'] ); ?> 424 426 </button> 425 427 <?php endif; ?> 426 <button type="button" class="button select-media not-selected">427 <?php echo esc_html( $this->l10n['add_media'] ); ?>428 </button>429 428 </p> 430 429 <div class="media-widget-fields"> 431 430 </div>