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. git-svn-id: https://develop.svn.wordpress.org/trunk@35507 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ee98fd84bb
commit
48501d6658
|
@ -848,13 +848,6 @@ function populate_roles_300() {
|
||||||
$role->add_cap( 'update_core' );
|
$role->add_cap( 'update_core' );
|
||||||
$role->add_cap( 'list_users' );
|
$role->add_cap( 'list_users' );
|
||||||
$role->add_cap( 'remove_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( 'promote_users' );
|
||||||
$role->add_cap( 'edit_theme_options' );
|
$role->add_cap( 'edit_theme_options' );
|
||||||
$role->add_cap( 'delete_themes' );
|
$role->add_cap( 'delete_themes' );
|
||||||
|
|
|
@ -34,6 +34,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||||
$caps[] = 'remove_users';
|
$caps[] = 'remove_users';
|
||||||
break;
|
break;
|
||||||
case 'promote_user':
|
case 'promote_user':
|
||||||
|
case 'add_users':
|
||||||
$caps[] = 'promote_users';
|
$caps[] = 'promote_users';
|
||||||
break;
|
break;
|
||||||
case 'edit_user':
|
case 'edit_user':
|
||||||
|
|
Loading…
Reference in New Issue