Privacy: require manage_privacy_options capability for showing WP_Privacy_Policy_Content::notice().

Props ocean90.
Fixes #44055.
Built from https://develop.svn.wordpress.org/trunk@43248


git-svn-id: http://core.svn.wordpress.org/trunk@43077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-05-13 11:04:21 +00:00
parent 9a390ea6bd
commit b82fed1806
2 changed files with 5 additions and 1 deletions

View File

@ -1565,6 +1565,10 @@ final class WP_Privacy_Policy_Content {
return;
}
if ( ! current_user_can( 'manage_privacy_options' ) ) {
return;
}
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
if ( ! $policy_page_id || $policy_page_id != $post->ID ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43247';
$wp_version = '5.0-alpha-43248';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.