mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed roles wp_capabilities init;
- fixed 2.0 upgrade transfer logic with roles and capabilities;
This commit is contained in:
@@ -52,7 +52,7 @@ if ( ! class_exists( 'Roles_Capabilities' ) ) {
|
||||
$details['capabilities'] = array_fill_keys( array_values( $capabilities ), true );
|
||||
unset( $details['wp_capabilities'] );
|
||||
$wp_roles->roles[$role_id] = $details;
|
||||
$wp_roles->role_objects[$role_id] = new \WP_Role( $role_id, $capabilities );
|
||||
$wp_roles->role_objects[$role_id] = new \WP_Role( $role_id, $details['capabilities'] );
|
||||
$wp_roles->role_names[$role_id] = $details['name'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user