On 4.4 upgrade, remove the unused 'add_users' cap from all roles.
Fixes #16719. Built from https://develop.svn.wordpress.org/trunk@35701 git-svn-id: http://core.svn.wordpress.org/trunk@35665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b875cd1b72
commit
f173cdfb18
|
@ -545,7 +545,7 @@ function upgrade_all() {
|
|||
if ( $wp_current_db_version < 33056 )
|
||||
upgrade_431();
|
||||
|
||||
if ( $wp_current_db_version < 34030 )
|
||||
if ( $wp_current_db_version < 35700 )
|
||||
upgrade_440();
|
||||
|
||||
maybe_disable_link_manager();
|
||||
|
@ -1619,6 +1619,14 @@ function upgrade_440() {
|
|||
if ( $wp_current_db_version < 34030 ) {
|
||||
$wpdb->query( "ALTER TABLE {$wpdb->options} MODIFY option_name VARCHAR(191)" );
|
||||
}
|
||||
|
||||
// Remove the unused 'add_users' role.
|
||||
$roles = wp_roles();
|
||||
foreach ( $roles->role_objects as $role ) {
|
||||
if ( $role->has_cap( 'add_users' ) ) {
|
||||
$role->remove_cap( 'add_users' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-beta4-35700';
|
||||
$wp_version = '4.4-beta4-35701';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 35638;
|
||||
$wp_db_version = 35700;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
|
Loading…
Reference in New Issue