mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix form error with users tags
This commit is contained in:
@@ -167,7 +167,7 @@
|
||||
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
||||
}
|
||||
|
||||
if ( isset( $array['type'] ) && $array['type'] == 'user_tags' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) ) {
|
||||
if ( defined('um_user_tags_path') && isset( $array['type'] ) && $array['type'] == 'user_tags' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) ) {
|
||||
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -65,8 +65,8 @@ class UM_Members {
|
||||
|
||||
$fields = $ultimatemember->builtin->all_user_fields;
|
||||
|
||||
if ( isset( $fields[$filter] ) ) {
|
||||
$attrs = $fields[$filter];
|
||||
if ( isset( $fields[ $filter ] ) ) {
|
||||
$attrs = $fields[ $filter ];
|
||||
} else {
|
||||
$attrs = apply_filters("um_custom_search_field_{$filter}", array() );
|
||||
}
|
||||
@@ -77,9 +77,9 @@ class UM_Members {
|
||||
if ( $ultimatemember->builtin->is_dropdown_field( $filter, $attrs ) ) {
|
||||
$type = 'select';
|
||||
} else if ( 'user_tags' == $attrs['type'] ) {
|
||||
$attrs['options'] = apply_filters('um_multiselect_options_user_tags', array(), $attrs);
|
||||
$attrs['custom'] = 1;
|
||||
$type = 'select';
|
||||
$attrs['options'] = apply_filters('um_multiselect_options_user_tags', array(), $attrs);
|
||||
$attrs['custom'] = 1;
|
||||
$type = 'select';
|
||||
} else {
|
||||
$type = 'text';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user