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

Props ocean90.
Fixes #44055.

git-svn-id: https://develop.svn.wordpress.org/trunk@43248 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2018-05-13 11:03:57 +00:00
parent b4a1fc692d
commit 155f8fd99a

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 ) {