Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.