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

Props ocean90.
Merges [43248] to the 4.9 branch.
Fixes #44055.

Built from https://develop.svn.wordpress.org/branches/4.9@43277


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
iandunn 2018-05-15 18:04:25 +00:00
parent 61322a844a
commit d1007dd45c
2 changed files with 5 additions and 1 deletions

View File

@ -1517,6 +1517,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 = '4.9.6-RC1-43276';
$wp_version = '4.9.6-RC1-43277';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.