mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- small fixed. Return an empty array if the "um_roles" option is not specified
This commit is contained in:
@@ -3137,7 +3137,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
global $wp_roles;
|
||||
$role_keys = array_map( function( $item ) {
|
||||
return 'um_' . $item;
|
||||
}, get_option( 'um_roles' ) );
|
||||
}, get_option( 'um_roles', array() ) );
|
||||
$exclude_roles = array_diff( array_keys( $wp_roles->roles ), array_merge( $role_keys, array( 'subscriber' ) ) );
|
||||
|
||||
$roles = UM()->roles()->get_roles( false, $exclude_roles );
|
||||
|
||||
Reference in New Issue
Block a user