- fixed integration with User Tags extension (remove some hardcode, changed to hooks);

- fixed 2.0 upgrades for User roles meta data;
- clear/review code;
This commit is contained in:
nikitozzzzzzz
2017-09-06 09:03:24 +03:00
parent 31de1e49ce
commit 2921707a65
9 changed files with 309 additions and 102 deletions
+2 -9
View File
@@ -79,15 +79,8 @@ if ( ! class_exists( 'Members' ) ) {
// additional filter for search field attributes
$attrs = apply_filters("um_search_field_{$filter}", $attrs);
if ( UM()->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';
} else {
$type = 'text';
}
$type = UM()->builtin()->is_dropdown_field( $filter, $attrs ) ? 'select' : 'text';
$type = apply_filters( 'um_search_field_type', $type, $attrs );
// filter all search fields
$attrs = apply_filters( 'um_search_fields', $attrs );