Make WordPress Core

Changeset 49064


Ignore:
Timestamp:
09/27/2020 08:46:44 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Media: Make the "Copy URL" button implementation more consistent with other instances in core:

  • Make the "Copied!" text green.
  • Make the button verbiage clear that it's copied "to clipboard".

Props garrett-eclipse, mukesh27.
Fixes #51355.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/media.css

    r48368 r49064  
    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}
  • trunk/src/wp-admin/includes/media.php

    r49021 r49064  
    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>
  • trunk/src/wp-includes/css/media-views.css

    r48375 r49064  
    475475    padding: 0;
    476476    min-height: 0;
     477    line-height: 2.18181818;
    477478    text-align: left;
     479    color: #40860a;
    478480}
    479481
  • trunk/src/wp-includes/media-template.php

    r49012 r49064  
    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>
     
    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>
Note: See TracChangeset for help on using the changeset viewer.