mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 22:26:06 +01:00
Role/Capability: Add explicit cases to map_meta_cap()
for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191.
Fixes #38201 Built from https://develop.svn.wordpress.org/trunk@38695 git-svn-id: http://core.svn.wordpress.org/trunk@38638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a51267269b
commit
52cf3d3d0f
@ -402,6 +402,16 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
case 'delete_site':
|
||||
$caps[] = 'manage_options';
|
||||
break;
|
||||
case 'create_sites':
|
||||
case 'delete_sites':
|
||||
case 'manage_network':
|
||||
case 'manage_sites':
|
||||
case 'manage_network_users':
|
||||
case 'manage_network_plugins':
|
||||
case 'manage_network_themes':
|
||||
case 'manage_network_options':
|
||||
$caps[] = $cap;
|
||||
break;
|
||||
default:
|
||||
// Handle meta capabilities for custom post types.
|
||||
global $post_type_meta_caps;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38694';
|
||||
$wp_version = '4.7-alpha-38695';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user