From 52cf3d3d0fc63c30113a62c4f3c0fa68d7529b40 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 30 Sep 2016 22:06:28 +0000 Subject: [PATCH] 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 --- wp-includes/capabilities.php | 10 ++++++++++ wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index da542293dd..15e9ef9870 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 67076b616c..2a00bdfaf4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.