Make WordPress Core

Ticket #51355: 51355.diff

File 51355.diff, 3.4 KB (added by garrett-eclipse, 4 years ago)

Initial patch to make the Copied text green and the button verbiage append 'to clipboard'

  • src/wp-admin/css/media.css

     
    804804        clear: both;
    805805}
    806806
     807.copy-to-clipboard-container .copy-attachment-url {
     808        white-space: normal;
     809}
     810
    807811.copy-to-clipboard-container .success {
     812        color: #40860a;
    808813        margin-left: 8px;
    809814}
    810815
  • src/wp-admin/includes/media.php

     
    32713271                <label for="attachment_url"><?php _e( 'File URL:' ); ?></label>
    32723272                <input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" />
    32733273                <span class="copy-to-clipboard-container">
    3274                         <button type="button" class="button copy-attachment-url edit-media" data-clipboard-target="#attachment_url"><?php _e( 'Copy URL' ); ?></button>
     3274                        <button type="button" class="button copy-attachment-url edit-media" data-clipboard-target="#attachment_url"><?php _e( 'Copy URL to clipboard' ); ?></button>
    32753275                        <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
    32763276                </span>
    32773277        </div>
  • src/wp-includes/css/media-views.css

     
    474474.attachment-details .copy-to-clipboard-container .success {
    475475        padding: 0;
    476476        min-height: 0;
     477        line-height: 2.18181818;
    477478        text-align: left;
     479        color: #40860a;
    478480}
    479481
    480482.compat-item label span {
  • src/wp-includes/media-template.php

     
    503503                                        <label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
    504504                                        <input type="text" class="attachment-details-copy-link" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly />
    505505                                        <span class="copy-to-clipboard-container">
    506                                                 <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL' ); ?></button>
     506                                                <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button>
    507507                                                <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
    508508                                        </span>
    509509                                </span>
     
    694694                        <label for="attachment-details-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
    695695                        <input type="text" class="attachment-details-copy-link" id="attachment-details-copy-link" value="{{ data.url }}" readonly />
    696696                        <div class="copy-to-clipboard-container">
    697                                 <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL' ); ?></button>
     697                                <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button>
    698698                                <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
    699699                        </div>
    700700                </span>