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/includes/upgrade.php

    r47219 r47269  
    835835    }
    836836
     837    if ( $wp_current_db_version < 47269 ) {
     838        upgrade_540();
     839    }
     840
    837841    maybe_disable_link_manager();
    838842
     
    21562160
    21572161/**
     2162 * Executes changes made in WordPress 5.4.0.
     2163 *
     2164 * @ignore
     2165 * @since 5.4.0
     2166 *
     2167 * @global int $wp_current_db_version The old (current) database version.
     2168 */
     2169function upgrade_540() {
     2170    global $wp_current_db_version;
     2171
     2172    if ( $wp_current_db_version < 47269 ) {
     2173        populate_roles_540();
     2174    }
     2175}
     2176
     2177/**
    21582178 * Executes network-level upgrade routines.
    21592179 *
Note: See TracChangeset for help on using the changeset viewer.