From 9224e14e67735e73c41cfa714f6ca8c8acb41ef8 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 26 Jan 2020 23:00:54 +0000 Subject: [PATCH] Privacy: Cleanup `.wp-policy-help` CSS remnants and add back-compat when hiding the tutorial content before copying. Props garrett-eclipse. Fixes #49282. git-svn-id: https://develop.svn.wordpress.org/trunk@47112 602fd350-edb4-49c9-b593-d223f7449a82 --- .../_enqueues/vendor/tinymce/skins/wordpress/wp-content.css | 5 ----- src/wp-admin/css/edit.css | 2 ++ src/wp-admin/includes/plugin.php | 5 +++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/js/_enqueues/vendor/tinymce/skins/wordpress/wp-content.css b/src/js/_enqueues/vendor/tinymce/skins/wordpress/wp-content.css index 7ac8906163..7e7580fb5a 100644 --- a/src/js/_enqueues/vendor/tinymce/skins/wordpress/wp-content.css +++ b/src/js/_enqueues/vendor/tinymce/skins/wordpress/wp-content.css @@ -265,11 +265,6 @@ a[data-wplink-url-error]:before { z-index: -1; } -/* Special styling for the suggestes policy text tutorial sections after they have been pasted in the editor. */ -p.wp-policy-help { - background-color: #ff0; -} - /** * WP Views */ diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index 20d4c4d27a..a2cadf3900 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -729,6 +729,7 @@ form#tags-filter { margin-top: 6px; } +.hide-privacy-policy-tutorial .wp-policy-help, /* For back-compat see #49282 */ .hide-privacy-policy-tutorial .privacy-policy-tutorial { visibility: hidden; } @@ -737,6 +738,7 @@ form#tags-filter { font-style: italic; } +.wp-suggested-text p.wp-policy-help, /* For back-compat see #49282 */ .wp-suggested-text p.privacy-policy-tutorial { font-style: normal; } diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index ff87539798..da2afa9e6e 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -2257,6 +2257,11 @@ function plugin_sandbox_scrape( $plugin ) { * For more information see the Plugin Handbook: * https://developer.wordpress.org/plugins/privacy/suggesting-text-for-the-site-privacy-policy/. * + * The HTML contents of the `$policy_text` supports use of a specialized `privacy-policy-tutorial` css class + * which can be used to provide supplemental information. Any content contained within html elements + * that have the `privacy-policy-tutorial` css class applied will be omitted from the clipboard + * when the section content is copied. + * * Intended for use with the `'admin_init'` action. * * @since 4.9.6