diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index f2c8765cef..e71cbfa928 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -119,6 +119,15 @@ function map_meta_cap( $cap, $user_id ) { $caps[] = $post_type->cap->delete_private_posts; } } + + /* + * Setting the privacy policy page requires `manage_privacy_options`, + * so deleting it should require that too. + */ + if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { + $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); + } + break; // edit_post breaks down to edit_posts, edit_published_posts, or // edit_others_posts @@ -180,6 +189,15 @@ function map_meta_cap( $cap, $user_id ) { $caps[] = $post_type->cap->edit_private_posts; } } + + /* + * Setting the privacy policy page requires `manage_privacy_options`, + * so editing it should require that too. + */ + if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { + $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); + } + break; case 'read_post': case 'read_page': diff --git a/wp-includes/version.php b/wp-includes/version.php index c788255a69..d41ecec860 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-43285'; +$wp_version = '4.9.6-RC1-43287'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.