From 1ab6f67ef51ee918d0292a0ee0c8d334cf0ea4c0 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 27 Mar 2019 22:30:26 +0000 Subject: [PATCH] Site Health: Improve the "Copy to clipboard" button. The previous method for copying the debug report to the clipboard involved having a hidden ` - - - - - - +
- - + +
- +
- - + +
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 5bba581d8f..3a3f57eded 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -924,6 +924,8 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array( 'utils', 'jquery' ), false, 1 ); + $scripts->add( 'clipboard', "/wp-includes/js/clipboard$suffix.js", array(), false, 1 ); + // Back-compat for old DFW. To-do: remove at the end of 2016. $scripts->add( 'wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1 ); @@ -1688,7 +1690,7 @@ function wp_default_scripts( &$scripts ) { ) ); - $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); + $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); did_action( 'init' ) && $scripts->localize(