diff --git a/src/js/_enqueues/admin/privacy-tools.js b/src/js/_enqueues/admin/privacy-tools.js
index 802ec88f4b..435cc85641 100644
|
a
|
b
|
jQuery( document ).ready( function( $ ) { |
| 77 | 77 | |
| 78 | 78 | appendResultsAfterRow( $requestRow, 'notice-success', summaryMessage, [] ); |
| 79 | 79 | $this.hide(); |
| 80 | | |
| | 80 | |
| 81 | 81 | if ( 'undefined' !== typeof zipUrl ) { |
| 82 | 82 | window.location = zipUrl; |
| 83 | 83 | } else if ( ! sendAsEmail ) { |
| … |
… |
jQuery( document ).ready( function( $ ) { |
| 232 | 232 | |
| 233 | 233 | // Privacy policy page, copy button. |
| 234 | 234 | $( document ).on( 'click', function( event ) { |
| 235 | | var $target = $( event.target ); |
| 236 | | var $parent, $container, range; |
| | 235 | var $target = $( event.target ), |
| | 236 | $parent, |
| | 237 | $container, |
| | 238 | range, |
| | 239 | __ = wp.i18n.__ |
| | 240 | copiedNotice = $( event.target ).siblings( '.success' ); |
| 237 | 241 | |
| 238 | 242 | if ( $target.is( 'button.privacy-text-copy' ) ) { |
| 239 | 243 | $parent = $target.parent().parent(); |
| … |
… |
jQuery( document ).ready( function( $ ) { |
| 253 | 257 | window.getSelection().addRange( range ); |
| 254 | 258 | document.execCommand( 'copy' ); |
| 255 | 259 | |
| | 260 | copiedNotice.addClass( 'visible' ); |
| | 261 | wp.a11y.speak( __( 'The section has been added to your clipboard.' ) ); |
| | 262 | |
| 256 | 263 | $container.removeClass( 'hide-privacy-policy-tutorial' ); |
| 257 | 264 | window.getSelection().removeAllRanges(); |
| 258 | 265 | } catch ( er ) {} |
diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css
index 20d4c4d27a..08413abd6b 100644
|
a
|
b
|
form#tags-filter { |
| 714 | 714 | padding-bottom: 6px; |
| 715 | 715 | } |
| 716 | 716 | |
| | 717 | .privacy-text-actions .success { |
| | 718 | display: none; |
| | 719 | color: #40860a; |
| | 720 | float: right; |
| | 721 | padding-right: 1em; |
| | 722 | } |
| | 723 | |
| | 724 | .privacy-text-actions .success.visible { |
| | 725 | display: inline-block; |
| | 726 | height: 32px; |
| | 727 | } |
| | 728 | |
| 717 | 729 | .wp-privacy-policy-guide .policy-text h2 { |
| 718 | 730 | margin: 1.2em 0 1em; |
| 719 | 731 | padding: 0; |
diff --git a/src/wp-admin/includes/class-wp-privacy-policy-content.php b/src/wp-admin/includes/class-wp-privacy-policy-content.php
index 65f27470a3..38630a4002 100644
|
a
|
b
|
final class WP_Privacy_Policy_Content { |
| 425 | 425 | $content .= sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ); |
| 426 | 426 | $content .= '</span>'; |
| 427 | 427 | $content .= '</button>'; |
| | 428 | $content .= '<span class="success" aria-hidden="true">' . __( 'Copied!' ) . '</span>'; |
| 428 | 429 | $content .= '</div>'; |
| 429 | 430 | } |
| 430 | 431 | |
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 9fa1ec0a23..9aac019a58 100644
|
a
|
b
|
function wp_default_scripts( &$scripts ) { |
| 1474 | 1474 | $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y', 'wp-i18n' ), false, 1 ); |
| 1475 | 1475 | $scripts->set_translations( 'site-health' ); |
| 1476 | 1476 | |
| 1477 | | $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery' ), false, 1 ); |
| | 1477 | $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery', 'wp-a11y', 'wp-i18n' ), false, 1 ); |
| 1478 | 1478 | did_action( 'init' ) && $scripts->localize( |
| 1479 | 1479 | 'privacy-tools', |
| 1480 | 1480 | 'privacyToolsL10n', |