<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[48232] trunk/src: Accessibility: Media: Add a "Copy URL" button to the attachment File URL fields.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/48232">48232</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/48232","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>afercia</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-06-30 13:14:05 +0000 (Tue, 30 Jun 2020)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Accessibility: Media: Add a "Copy URL" button to the attachment File URL fields.
For a number of years, various screens in the WordPress admin provided users with a readonly input field to copy the attachment file URL. Manually copying from a readonly field is an annoying task at best even for mouser users. It's a usability and accessibility issue at the same time.
These fields now have a new "Copy URL" button that is easy to use and accessible to everyone.
Props theolg, markdubois, vabrashev, sajjad67, xkon, nrqsnchz, melchoyce, audrasjb, afercia.
See <a href="https://core.trac.wordpress.org/ticket/41612">#41612</a>, <a href="https://core.trac.wordpress.org/ticket/50322">#50322</a>, <a href="https://core.trac.wordpress.org/ticket/50335">#50335</a>.
Fixes <a href="https://core.trac.wordpress.org/ticket/48463">#48463</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueuesadminpostjs">trunk/src/js/_enqueues/admin/post.js</a></li>
<li><a href="#trunksrcjsmediaviewsattachmentdetailsjs">trunk/src/js/media/views/attachment/details.js</a></li>
<li><a href="#trunksrcwpadmincssmediacss">trunk/src/wp-admin/css/media.css</a></li>
<li><a href="#trunksrcwpadminincludesmediaphp">trunk/src/wp-admin/includes/media.php</a></li>
<li><a href="#trunksrcwpincludescssbuttonscss">trunk/src/wp-includes/css/buttons.css</a></li>
<li><a href="#trunksrcwpincludescssmediaviewscss">trunk/src/wp-includes/css/media-views.css</a></li>
<li><a href="#trunksrcwpincludesmediatemplatephp">trunk/src/wp-includes/media-template.php</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueuesadminpostjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/admin/post.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/admin/post.js 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/js/_enqueues/admin/post.js 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,7 +4,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @output wp-admin/js/post.js
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting, ClipboardJS */
</ins><span class="cx" style="display: block; padding: 0 10px"> /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply, commentsBox */
</span><span class="cx" style="display: block; padding: 0 10px"> /* global WPSetThumbnailHTML, wptitlehint */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -297,7 +297,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $postVisibilitySelect = $('#post-visibility-select'),
</span><span class="cx" style="display: block; padding: 0 10px"> $timestampdiv = $('#timestampdiv'),
</span><span class="cx" style="display: block; padding: 0 10px"> $postStatusSelect = $('#post-status-select'),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- isMac = window.navigator.platform ? window.navigator.platform.indexOf( 'Mac' ) !== -1 : false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ isMac = window.navigator.platform ? window.navigator.platform.indexOf( 'Mac' ) !== -1 : false,
+ copyAttachmentURLClipboard = new ClipboardJS( '.copy-attachment-url.edit-media' ),
+ copyAttachmentURLSuccessTimeout,
+ __ = wp.i18n.__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> postboxes.add_postbox_toggles(pagenow);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1217,8 +1220,39 @@
</span><span class="cx" style="display: block; padding: 0 10px"> window.history.replaceState( null, null, location );
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-});
</del><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Copies the attachment URL in the Edit Media page to the clipboard.
+ *
+ * @since 5.5.0
+ *
+ * @param {MouseEvent} event A click event.
+ *
+ * @returns {void}
+ */
+ copyAttachmentURLClipboard.on( 'success', function( event ) {
+ var triggerElement = $( event.trigger ),
+ successElement = $( '.success', triggerElement.closest( '.copy-to-clipboard-container' ) );
+
+ // Clear the selection and move focus back to the trigger.
+ event.clearSelection();
+ // Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
+ triggerElement.focus();
+
+ // Show success visual feedback.
+ clearTimeout( copyAttachmentURLSuccessTimeout );
+ successElement.removeClass( 'hidden' );
+
+ // Hide success visual feedback after 3 seconds since last success.
+ copyAttachmentURLSuccessTimeout = setTimeout( function() {
+ successElement.addClass( 'hidden' );
+ }, 3000 );
+
+ // Handle success audible feedback.
+ wp.a11y.speak( __( 'The file URL has been copied to your clipboard' ) );
+ } );
+} );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * TinyMCE word count display
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunksrcjsmediaviewsattachmentdetailsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/media/views/attachment/details.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/media/views/attachment/details.js 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/js/media/views/attachment/details.js 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,7 +1,9 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/* global ClipboardJS */
</ins><span class="cx" style="display: block; padding: 0 10px"> var Attachment = wp.media.view.Attachment,
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> $ = jQuery,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Details;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ Details,
+ __ = wp.i18n.__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototype */{
</span><span class="cx" style="display: block; padding: 0 10px"> tagName: 'div',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,6 +29,42 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Copies the attachment URL to the clipboard.
+ *
+ * @since 5.5.0
+ *
+ * @param {MouseEvent} event A click event.
+ *
+ * @returns {void}
+ */
+ copyAttachmentDetailsURLClipboard: function() {
+ var clipboard = new ClipboardJS( '.copy-attachment-url' ),
+ successTimeout;
+
+ clipboard.on( 'success', function( event ) {
+ var triggerElement = $( event.trigger ),
+ successElement = $( '.success', triggerElement.closest( '.copy-to-clipboard-container' ) );
+
+ // Clear the selection and move focus back to the trigger.
+ event.clearSelection();
+ // Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
+ triggerElement.focus();
+
+ // Show success visual feedback.
+ clearTimeout( successTimeout );
+ successElement.removeClass( 'hidden' );
+
+ // Hide success visual feedback after 3 seconds since last success.
+ successTimeout = setTimeout( function() {
+ successElement.addClass( 'hidden' );
+ }, 3000 );
+
+ // Handle success audible feedback.
+ wp.a11y.speak( __( 'The file URL has been copied to your clipboard' ) );
+ } );
+ },
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Shows the details of an attachment.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.5.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,6 +81,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Call 'initialize' directly on the parent class.
</span><span class="cx" style="display: block; padding: 0 10px"> Attachment.prototype.initialize.apply( this, arguments );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ this.copyAttachmentDetailsURLClipboard();
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpadmincssmediacss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/media.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/media.css 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/wp-admin/css/media.css 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -797,7 +797,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> text-decoration: none;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.copy-to-clipboard-container {
+ display: flex;
+ align-items: center;
+ margin-top: 8px;
+ clear: both;
+}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.copy-to-clipboard-container .success {
+ margin-left: 8px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /*------------------------------------------------------------------------------
</span><span class="cx" style="display: block; padding: 0 10px"> 14.2 - Image Editor
</span><span class="cx" style="display: block; padding: 0 10px"> ------------------------------------------------------------------------------*/
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1215,6 +1225,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> width: auto;
</span><span class="cx" style="display: block; padding: 0 10px"> max-width: none;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ .copy-to-clipboard-container .success {
+ font-size: 14px;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpadminincludesmediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/media.php 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/wp-admin/includes/media.php 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3268,6 +3268,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="misc-pub-section misc-pub-attachment">
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="attachment_url"><?php _e( 'File URL:' ); ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" />
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span class="copy-to-clipboard-container">
+ <button type="button" class="button copy-attachment-url edit-media" data-clipboard-target="#attachment_url"><?php _e( 'Copy URL' ); ?></button>
+ <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
+ </span>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="misc-pub-section misc-pub-filename">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php _e( 'File name:' ); ?> <strong><?php echo $filename; ?></strong>
</span></span></pre></div>
<a id="trunksrcwpincludescssbuttonscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/css/buttons.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/css/buttons.css 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/wp-includes/css/buttons.css 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -354,6 +354,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin-bottom: 4px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* Copy attachment URL button in the legacy edit media page. */
+ .wp-core-ui .copy-to-clipboard-container .copy-attachment-url {
+ margin-bottom: 0;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> #media-upload.wp-core-ui .button {
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 0 10px 1px;
</span><span class="cx" style="display: block; padding: 0 10px"> min-height: 24px;
</span></span></pre></div>
<a id="trunksrcwpincludescssmediaviewscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/css/media-views.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/css/media-views.css 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/wp-includes/css/media-views.css 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -457,6 +457,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 12px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.media-sidebar .copy-to-clipboard-container,
+.attachment-details .copy-to-clipboard-container {
+ flex-wrap: wrap;
+ margin-top: 10px;
+ margin-left: calc( 35% - 1px );
+ padding-top: 10px;
+}
+
+/* Needs high specificity. */
+.attachment-details .attachment-info .copy-to-clipboard-container {
+ float: none;
+}
+
+.media-sidebar .copy-to-clipboard-container .success,
+.attachment-details .copy-to-clipboard-container .success {
+ padding: 0;
+ min-height: 0;
+ text-align: left;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .compat-item label span {
</span><span class="cx" style="display: block; padding: 0 10px"> text-align: right;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2539,6 +2559,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 8px 2px 2px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* Needs high specificity. */
+ .media-sidebar .setting .copy-to-clipboard-container,
+ .attachment-details .attachment-info .copy-to-clipboard-container {
+ margin-left: 0;
+ padding-top: 0;
+ }
+
+ .media-sidebar .setting .copy-attachment-url,
+ .attachment-details .attachment-info .copy-attachment-url {
+ margin: 0 1px;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .media-sidebar .setting .value,
</span><span class="cx" style="display: block; padding: 0 10px"> .attachment-details .setting .value {
</span><span class="cx" style="display: block; padding: 0 10px"> float: none;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2712,12 +2744,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .media-frame-toolbar .media-toolbar {
</span><span class="cx" style="display: block; padding: 0 10px"> bottom: -54px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-@media screen and (max-width: 782px) {
</del><span class="cx" style="display: block; padding: 0 10px"> .mode-grid .attachments-browser .media-toolbar-primary {
</span><span class="cx" style="display: block; padding: 0 10px"> display: block;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ .media-sidebar .copy-to-clipboard-container .success,
+ .attachment-details .copy-to-clipboard-container .success {
+ font-size: 14px;
+ line-height: 2.71428571;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* Responsive on portrait and landscape */
</span></span></pre></div>
<a id="trunksrcwpincludesmediatemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media-template.php 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/wp-includes/media-template.php 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -500,8 +500,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> <# } #>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="setting" data-setting="url">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'Copy Link' ); ?></label>
- <input type="text" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
+ <input type="text" class="attachment-details-copy-link" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly />
+ <span class="copy-to-clipboard-container">
+ <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL' ); ?></button>
+ <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
+ </span>
</ins><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="attachment-compat"></div>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -687,8 +691,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <textarea id="attachment-details-description" {{ maybeReadOnly }}>{{ data.description }}</textarea>
</span><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="setting" data-setting="url">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label for="attachment-details-copy-link" class="name"><?php _e( 'Copy Link' ); ?></label>
- <input type="text" id="attachment-details-copy-link" value="{{ data.url }}" readonly />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label for="attachment-details-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
+ <input type="text" class="attachment-details-copy-link" id="attachment-details-copy-link" value="{{ data.url }}" readonly />
+ <div class="copy-to-clipboard-container">
+ <button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL' ); ?></button>
+ <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
+ </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> </span>
</span><span class="cx" style="display: block; padding: 0 10px"> </script>
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2020-06-30 12:27:05 UTC (rev 48231)
+++ trunk/src/wp-includes/script-loader.php 2020-06-30 13:14:05 UTC (rev 48232)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1232,7 +1232,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // To enqueue media-views or media-editor, call wp_enqueue_media().
</span><span class="cx" style="display: block; padding: 0 10px"> // Both rely on numerous settings, styles, and templates to operate correctly.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'wp-i18n' ), false, 1 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'wp-i18n', 'clipboard' ), false, 1 );
</ins><span class="cx" style="display: block; padding: 0 10px"> $scripts->set_translations( 'media-views' );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1294,7 +1294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-sanitize' ), false, 1 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-sanitize', 'clipboard', 'wp-i18n' ), false, 1 );
</ins><span class="cx" style="display: block; padding: 0 10px"> did_action( 'init' ) && $scripts->localize(
</span><span class="cx" style="display: block; padding: 0 10px"> 'post',
</span><span class="cx" style="display: block; padding: 0 10px"> 'postL10n',
</span></span></pre>
</div>
</div>
</body>
</html>