Privacy: Revert [47269] for now to address side effects on Multisite installations.
See #44176. Built from https://develop.svn.wordpress.org/trunk@47280 git-svn-id: http://core.svn.wordpress.org/trunk@47080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -132,7 +132,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
|
||||
* so deleting it should require that too.
|
||||
*/
|
||||
if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) {
|
||||
$caps[] = 'manage_privacy_options';
|
||||
$caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) );
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -203,7 +203,7 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
|
||||
* so editing it should require that too.
|
||||
*/
|
||||
if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) {
|
||||
$caps[] = 'manage_privacy_options';
|
||||
$caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) );
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -580,6 +580,11 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
|
||||
$caps[] = 'update_core';
|
||||
}
|
||||
break;
|
||||
case 'export_others_personal_data':
|
||||
case 'erase_others_personal_data':
|
||||
case 'manage_privacy_options':
|
||||
$caps[] = is_multisite() ? 'manage_network' : 'manage_options';
|
||||
break;
|
||||
default:
|
||||
// Handle meta capabilities for custom post types.
|
||||
global $post_type_meta_caps;
|
||||
|
||||
Reference in New Issue
Block a user