WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/11/2020 06:34:08 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Privacy: Un-map privacy capabilities to make them available to be assigned for custom roles:

  • erase_others_personal_data
  • export_others_personal_data
  • manage_privacy_options

Previously mapped to manage_options or manage_network (on Multisite), these are now added to the Administrator role separately.

Additionally, manage_privacy_options is added to the Editor role.

Props garrett-eclipse, xkon, pbiron, desrosj, johnbillion, flixos90, juliobox, lakenh, Ov3rfly, ianatkins.
Fixes #44176.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/menu.php

    r47219 r47269  
    289289}
    290290
    291 $menu[80]                               = array( __( 'Settings' ), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
     291$menu[80] = array( __( 'Settings' ), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
     292if ( current_user_can( 'manage_privacy_options' ) && ! current_user_can( 'manage_options' ) ) {
     293    $menu[80] = array( __( 'Settings' ), 'manage_privacy_options', 'options-privacy.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
     294}
     295
    292296    $submenu['options-general.php'][10] = array( _x( 'General', 'settings screen' ), 'manage_options', 'options-general.php' );
    293297    $submenu['options-general.php'][15] = array( __( 'Writing' ), 'manage_options', 'options-writing.php' );
Note: See TracChangeset for help on using the changeset viewer.