From 9135920061d3dd8d4893cb41696080b484527a6e Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 4 Nov 2015 17:54:25 +0000 Subject: [PATCH] Roles: map `add_users` cap to `promote_users` and remove it. "Never used, will be removed." - The Ghost of 3.5 Nacin Props Craig Ralston, renoirb. Fixes #16719. Built from https://develop.svn.wordpress.org/trunk@35507 git-svn-id: http://core.svn.wordpress.org/trunk@35471 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/schema.php | 7 ------- wp-includes/capabilities-functions.php | 1 + wp-includes/version.php | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 219eb0ab29..554adb8136 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -848,13 +848,6 @@ function populate_roles_300() { $role->add_cap( 'update_core' ); $role->add_cap( 'list_users' ); $role->add_cap( 'remove_users' ); - - /* - * Never used, will be removed. create_users or promote_users - * is the capability you're looking for. - */ - $role->add_cap( 'add_users' ); - $role->add_cap( 'promote_users' ); $role->add_cap( 'edit_theme_options' ); $role->add_cap( 'delete_themes' ); diff --git a/wp-includes/capabilities-functions.php b/wp-includes/capabilities-functions.php index 39bd23cfa2..623d863907 100644 --- a/wp-includes/capabilities-functions.php +++ b/wp-includes/capabilities-functions.php @@ -34,6 +34,7 @@ function map_meta_cap( $cap, $user_id ) { $caps[] = 'remove_users'; break; case 'promote_user': + case 'add_users': $caps[] = 'promote_users'; break; case 'edit_user': diff --git a/wp-includes/version.php b/wp-includes/version.php index def5b6c66e..80cc17971d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta2-35506'; +$wp_version = '4.4-beta2-35507'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.