mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed roles field, which isn't customized;
This commit is contained in:
@@ -3690,11 +3690,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
|
||||
//fix when customers change options for role (radio/dropdown) fields
|
||||
$intersected_options = array();
|
||||
foreach ( $options as $option ) {
|
||||
if ( false !== $search_key = array_search( $option, $roles ) ) {
|
||||
$intersected_options[ $search_key ] = $option;
|
||||
} else {
|
||||
$intersected_options[] = $option;
|
||||
foreach ( $options as $key => $title ) {
|
||||
if ( false !== $search_key = array_search( $title, $roles ) ) {
|
||||
$intersected_options[ $search_key ] = $title;
|
||||
} elseif ( isset( $roles[ $key ] ) ) {
|
||||
$intersected_options[ $key ] = $title;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user