On 4.4 upgrade, remove the unused 'add_users' cap from all roles.
Fixes #16719. git-svn-id: https://develop.svn.wordpress.org/trunk@35701 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
17ba0ec012
commit
33d9464c3c
@ -545,7 +545,7 @@ function upgrade_all() {
|
|||||||
if ( $wp_current_db_version < 33056 )
|
if ( $wp_current_db_version < 33056 )
|
||||||
upgrade_431();
|
upgrade_431();
|
||||||
|
|
||||||
if ( $wp_current_db_version < 34030 )
|
if ( $wp_current_db_version < 35700 )
|
||||||
upgrade_440();
|
upgrade_440();
|
||||||
|
|
||||||
maybe_disable_link_manager();
|
maybe_disable_link_manager();
|
||||||
@ -1619,6 +1619,14 @@ function upgrade_440() {
|
|||||||
if ( $wp_current_db_version < 34030 ) {
|
if ( $wp_current_db_version < 34030 ) {
|
||||||
$wpdb->query( "ALTER TABLE {$wpdb->options} MODIFY option_name VARCHAR(191)" );
|
$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' );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ $wp_version = '4.4-beta4-35625-src';
|
|||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 35638;
|
$wp_db_version = 35700;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
Loading…
Reference in New Issue
Block a user