From d1007dd45c4a0acb16893a46bcc4bcda437dbe26 Mon Sep 17 00:00:00 2001 From: iandunn Date: Tue, 15 May 2018 18:04:25 +0000 Subject: [PATCH] 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 --- wp-admin/includes/misc.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 745127d783..c44590f6e1 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 9415ca63fd..8fcc19bce7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.