From 36268e85babfdcfd424bb4ad549eca35baf105f0 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Tue, 23 May 2023 18:25:53 +0300 Subject: [PATCH 1/7] - add default sorting --- includes/admin/class-admin.php | 6 ++++ .../admin/templates/directory/sorting.php | 33 +++++++++++++++++++ includes/core/class-fields.php | 2 ++ includes/core/class-member-directory.php | 7 ++-- 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-admin.php b/includes/admin/class-admin.php index b6c7bbaf..742e2015 100644 --- a/includes/admin/class-admin.php +++ b/includes/admin/class-admin.php @@ -389,6 +389,12 @@ if ( ! class_exists( 'um\admin\Admin' ) ) { '_um_sortby_custom_label' => array( 'sanitize' => 'text', ), + '_um_sortby_custom_type' => array( + 'sanitize' => 'text', + ), + '_um_sortby_custom_order' => array( + 'sanitize' => 'text', + ), '_um_enable_sorting' => array( 'sanitize' => 'bool', ), diff --git a/includes/admin/templates/directory/sorting.php b/includes/admin/templates/directory/sorting.php index b7f7832a..6a33522b 100644 --- a/includes/admin/templates/directory/sorting.php +++ b/includes/admin/templates/directory/sorting.php @@ -7,6 +7,18 @@ global $post_id; $_um_sorting_fields = get_post_meta( $post_id, '_um_sorting_fields', true ); $_um_sorting_fields = empty( $_um_sorting_fields ) ? array() : $_um_sorting_fields; +$custom_type_options = array( + 'CHAR' => 'CHAR', + 'NUMERIC' => 'NUMERIC', + 'BINARY' => 'BINARY', + 'DATE' => 'DATE', + 'DATETIME' => 'DATETIME', + 'DECIMAL' => 'DECIMAL', + 'SIGNED' => 'SIGNED', + 'TIME' => 'TIME', + 'UNSIGNED' => 'UNSIGNED', +); + $fields = array( array( 'id' => '_um_sortby', @@ -24,6 +36,27 @@ $fields = array( 'value' => UM()->query()->get_meta_value( '_um_sortby_custom', null, 'na' ), 'conditional' => array( '_um_sortby', '=', 'other' ), ), + array( + 'id' => '_um_sortby_custom_type', + 'type' => 'select', + 'label' => __( 'Data type', 'ultimate-member' ), + 'tooltip' => __( 'To correct sort by a custom field, choose a data type', 'ultimate-member' ), + 'value' => UM()->query()->get_meta_value( '_um_sortby_custom_type', null, 'CHAR' ), + 'options' => $custom_type_options, + 'conditional' => array( '_um_sortby', '=', 'other' ), + ), + array( + 'id' => '_um_sortby_custom_order', + 'type' => 'select', + 'label' => __( 'Order', 'ultimate-member' ), + 'tooltip' => __( 'To correct sort by a custom field, choose an order', 'ultimate-member' ), + 'value' => UM()->query()->get_meta_value( '_um_sortby_custom_order', null, 'ASC' ), + 'options' => array( + 'ASC' => 'ASC', + 'DESC' => 'DESC', + ), + 'conditional' => array( '_um_sortby', '=', 'other' ), + ), array( 'id' => '_um_sortby_custom_label', 'type' => 'text', diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 596b9052..34930ce5 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -388,6 +388,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) { } update_post_meta( $directory_id, '_um_sortby_custom', '' ); update_post_meta( $directory_id, '_um_sortby_custom_label', '' ); + update_post_meta( $directory_id, '_um_sortby_custom_type', '' ); + update_post_meta( $directory_id, '_um_sortby_custom_order', '' ); } } diff --git a/includes/core/class-member-directory.php b/includes/core/class-member-directory.php index b04cbca9..090a5bdf 100644 --- a/includes/core/class-member-directory.php +++ b/includes/core/class-member-directory.php @@ -1423,7 +1423,8 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { } elseif ( ( ! empty( $directory_data['sortby_custom'] ) && $sortby == $directory_data['sortby_custom'] ) || in_array( $sortby, $custom_sort ) ) { - $custom_sort_type = apply_filters( 'um_member_directory_custom_sorting_type', 'CHAR', $sortby, $directory_data ); + $custom_sort_type = ! empty( $directory_data['sortby_custom_type'] ) ? $directory_data['sortby_custom_type'] : 'CHAR'; + $custom_sort_type = apply_filters( 'um_member_directory_custom_sorting_type', $custom_sort_type, $sortby, $directory_data ); $this->query_args['meta_query'][] = array( 'relation' => 'OR', @@ -1438,7 +1439,9 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { ) ); - $this->query_args['orderby'] = array( $sortby . '_cs' => 'ASC', 'user_login' => 'ASC' ); + $custom_sort_order = ! empty( $directory_data['sortby_custom_order'] ) ? $directory_data['sortby_custom_order'] : 'CHAR'; + + $this->query_args['orderby'] = array( $sortby . '_cs' => $custom_sort_order, 'user_login' => 'ASC' ); } else { From 781d21d32957ae0a6cd86f6c98e4a2ebf182c317 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 24 May 2023 11:04:50 +0300 Subject: [PATCH 2/7] - for meta table --- includes/core/class-member-directory-meta.php | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/includes/core/class-member-directory-meta.php b/includes/core/class-member-directory-meta.php index 268934ed..0b3809fb 100644 --- a/includes/core/class-member-directory-meta.php +++ b/includes/core/class-member-directory-meta.php @@ -144,10 +144,10 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) { global $wpdb; $result = $wpdb->get_var( $wpdb->prepare( - "SELECT umeta_id - FROM {$wpdb->prefix}um_metadata - WHERE user_id = %d AND - um_key = %s + "SELECT umeta_id + FROM {$wpdb->prefix}um_metadata + WHERE user_id = %d AND + um_key = %s LIMIT 1", $object_id, $meta_key @@ -517,7 +517,7 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) { $this->joins[] = "LEFT JOIN {$wpdb->prefix}um_metadata umm_general ON umm_general.user_id = u.ID"; $this->general_meta_joined = true; } - $this->where_clauses[] = "( umm_general.um_key = 'um_member_directory_data' AND + $this->where_clauses[] = "( umm_general.um_key = 'um_member_directory_data' AND umm_general.um_value LIKE '%s:14:\"account_status\";s:8:\"approved\";%' AND umm_general.um_value LIKE '%s:15:\"hide_in_members\";b:0;%'{$profile_photo_where}{$cover_photo_where} )"; } else { if ( ! empty( $cover_photo_where ) || ! empty( $profile_photo_where ) ) { @@ -697,9 +697,15 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) { $this->joins[] = "LEFT JOIN {$wpdb->prefix}um_metadata umm_sort ON ( umm_sort.user_id = u.ID AND umm_sort.um_key = '{$sortby}' )"; - $custom_sort_type = apply_filters( 'um_member_directory_custom_sorting_type', 'CHAR', $sortby, $directory_data ); + $custom_sort_type = ! empty( $directory_data['sortby_custom_type'] ) ? $directory_data['sortby_custom_type'] : 'CHAR'; + if ( 'NUMERIC' === $custom_sort_type ) { + $custom_sort_type = 'DECIMAL'; + } + $custom_sort_type = apply_filters( 'um_member_directory_custom_sorting_type', $custom_sort_type, $sortby, $directory_data ); - $this->sql_order = " ORDER BY CAST( umm_sort.um_value AS {$custom_sort_type} ) {$order} "; + $custom_sort_order = ! empty( $directory_data['sortby_custom_order'] ) ? $directory_data['sortby_custom_order'] : 'CHAR'; + + $this->sql_order = " ORDER BY CAST( umm_sort.um_value AS {$custom_sort_type} ) {$custom_sort_order} "; } elseif ( count( $numeric_sorting_keys ) && in_array( $sortby, $numeric_sorting_keys ) ) { From 65a25da89cf3243ffb3c142b419c1b7732f44e78 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 24 May 2023 13:31:57 +0300 Subject: [PATCH 3/7] - add sorting options in admin area --- includes/admin/assets/js/um-admin-forms.js | 15 +++++++++ includes/admin/class-admin.php | 6 ++++ includes/admin/core/class-admin-forms.php | 37 ++++++++++++++++------ includes/core/class-member-directory.php | 16 ++++++++-- 4 files changed, 63 insertions(+), 11 deletions(-) diff --git a/includes/admin/assets/js/um-admin-forms.js b/includes/admin/assets/js/um-admin-forms.js index 314d6d24..f47f8017 100644 --- a/includes/admin/assets/js/um-admin-forms.js +++ b/includes/admin/assets/js/um-admin-forms.js @@ -250,6 +250,21 @@ jQuery(document).ready( function() { '' + wp.i18n.__( 'Remove', 'ultimate-member' ) + '' + '' + '' + + '' + + '' + '' + ''; list.append( html ); diff --git a/includes/admin/class-admin.php b/includes/admin/class-admin.php index 742e2015..2e8b66ef 100644 --- a/includes/admin/class-admin.php +++ b/includes/admin/class-admin.php @@ -873,6 +873,12 @@ if ( ! class_exists( 'um\admin\Admin' ) ) { if ( isset( $item['label'] ) ) { $item['label'] = sanitize_text_field( $item['label'] ); } + if ( isset( $item['order'] ) ) { + $item['order'] = sanitize_text_field( $item['order'] ); + } + if ( isset( $item['data_type'] ) ) { + $item['data_type'] = sanitize_text_field( $item['data_type'] ); + } return $item; } else { diff --git a/includes/admin/core/class-admin-forms.php b/includes/admin/core/class-admin-forms.php index 260d29a9..c5e30524 100644 --- a/includes/admin/core/class-admin-forms.php +++ b/includes/admin/core/class-admin-forms.php @@ -1590,14 +1590,18 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { if ( ! empty( $values ) && is_array( $values ) ) { foreach ( $values as $k => $value ) { - $other_key = ''; + $other_key = ''; $other_label = ''; + $other_type = ''; + $other_order = ''; if ( is_array( $value ) ) { - $keys = array_keys( $value ); + $keys = array_keys( $value ); $other_key = $keys[0]; - $labels = array_values( $value ); + $labels = array_values( $value ); $other_label = $labels[0]; + $other_type = $value['type']; + $other_order = $value['order']; } else { if ( ! in_array( $value, array_keys( $field_data['options'] ) ) ) { continue; @@ -1621,12 +1625,27 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { if ( $sorting ) { $html .= ''; } - $html .= " - - " . __( 'Remove', 'ultimate-member' ) . " - - - "; + $html .= ' + + ' . __( 'Remove', 'ultimate-member' ) . ' + + + + + '; } } elseif ( ! empty( $field_data['show_default_number'] ) && is_numeric( $field_data['show_default_number'] ) && $field_data['show_default_number'] > 0 ) { $i = 0; diff --git a/includes/core/class-member-directory.php b/includes/core/class-member-directory.php index 090a5bdf..448a1f75 100644 --- a/includes/core/class-member-directory.php +++ b/includes/core/class-member-directory.php @@ -210,7 +210,6 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { if ( ! empty( $value ) && in_array( $key, array( '_um_view_types', '_um_roles', '_um_roles_can_search', '_um_roles_can_filter' ), true ) ) { $value = array_keys( $value ); } elseif ( '_um_search_filters' === $key ) { - $temp_value = array(); if ( ! empty( $value ) ) { @@ -264,8 +263,17 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { if ( ! empty( $other_data[ $k ]['label'] ) ) { $metalabel = wp_strip_all_tags( $other_data[ $k ]['label'] ); } + if ( ! empty( $other_data[ $k ]['data_type'] ) ) { + $data_type = sanitize_text_field( $other_data[ $k ]['data_type'] ); + } + if ( ! empty( $other_data[ $k ]['order'] ) ) { + $order = sanitize_text_field( $other_data[ $k ]['order'] ); + } $row = array( - $metakey => ! empty( $metalabel ) ? $metalabel : $metakey, + $metakey => $metakey, + 'label' => ! empty( $metalabel ) ? $metalabel : $metakey, + 'type' => ! empty( $data_type ) ? $data_type : '', + 'order' => ! empty( $order ) ? $order : '', ); } } @@ -275,6 +283,10 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { $value = sanitize_text_field( $value ); } elseif ( '_um_sortby_custom_label' === $key ) { $value = wp_strip_all_tags( $value ); + } elseif ( '_um_sortby_custom_type' === $key ) { + $value = sanitize_text_field( $value ); + } elseif ( '_um_sortby_custom_order' === $key ) { + $value = sanitize_text_field( $value ); } } From 995c07d76a8478f57c3dab7052c138d307f45e24 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 24 May 2023 15:24:29 +0300 Subject: [PATCH 4/7] - sorting in member directory --- includes/core/class-member-directory.php | 39 +++++++++++++++++------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/includes/core/class-member-directory.php b/includes/core/class-member-directory.php index 448a1f75..231f44dd 100644 --- a/includes/core/class-member-directory.php +++ b/includes/core/class-member-directory.php @@ -1434,26 +1434,40 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { unset( $this->query_args['order'] ); } elseif ( ( ! empty( $directory_data['sortby_custom'] ) && $sortby == $directory_data['sortby_custom'] ) || in_array( $sortby, $custom_sort ) ) { + $custom_sort_order = ! empty( $directory_data['sortby_custom_order'] ) ? $directory_data['sortby_custom_order'] : 'CHAR'; $custom_sort_type = ! empty( $directory_data['sortby_custom_type'] ) ? $directory_data['sortby_custom_type'] : 'CHAR'; + if ( ! empty( $directory_data['sorting_fields'] ) ) { + // phpcs:disable WordPress.Security.NonceVerification -- already verified here + $sorting = sanitize_text_field( $_POST['sorting'] ); + $sorting_fields = unserialize( $directory_data['sorting_fields'] ); + // phpcs:enable WordPress.Security.NonceVerification + foreach ( $sorting_fields as $field ) { + if ( isset( $field[ $sorting ] ) ) { + $custom_sort_type = $field['type']; + $custom_sort_order = $field['order']; + } + } + } $custom_sort_type = apply_filters( 'um_member_directory_custom_sorting_type', $custom_sort_type, $sortby, $directory_data ); $this->query_args['meta_query'][] = array( - 'relation' => 'OR', + 'relation' => 'OR', $sortby . '_cs' => array( - 'key' => $sortby, - 'compare' => 'EXISTS', - 'type' => $custom_sort_type, + 'key' => $sortby, + 'compare' => 'EXISTS', + 'type' => $custom_sort_type, ), array( - 'key' => $sortby, - 'compare' => 'NOT EXISTS', - ) + 'key' => $sortby, + 'compare' => 'NOT EXISTS', + ), ); - $custom_sort_order = ! empty( $directory_data['sortby_custom_order'] ) ? $directory_data['sortby_custom_order'] : 'CHAR'; - - $this->query_args['orderby'] = array( $sortby . '_cs' => $custom_sort_order, 'user_login' => 'ASC' ); + $this->query_args['orderby'] = array( + $sortby . '_cs' => $custom_sort_order, + 'user_login' => 'ASC', + ); } else { @@ -2629,7 +2643,10 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { add_filter( 'get_meta_sql', array( &$this, 'change_meta_sql' ), 10, 6 ); add_filter( 'pre_user_query', array( &$this, 'pagination_changes' ), 10, 1 ); - +//echo '
';
+//print_r($this->query_args);
+//echo '
'; +//exit(); $user_query = new \WP_User_Query( $this->query_args ); remove_filter( 'pre_user_query', array( &$this, 'pagination_changes' ), 10 ); From e4c30a472ef2178d0a3ec3e85e41c1410963fccb Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 24 May 2023 15:45:27 +0300 Subject: [PATCH 5/7] - sorting for meta table --- includes/core/class-member-directory-meta.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/includes/core/class-member-directory-meta.php b/includes/core/class-member-directory-meta.php index 0b3809fb..4b616a69 100644 --- a/includes/core/class-member-directory-meta.php +++ b/includes/core/class-member-directory-meta.php @@ -694,17 +694,28 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) { // handle sorting options // sort members by if ( $sortby == $directory_data['sortby_custom'] || in_array( $sortby, $custom_sort ) ) { + $custom_sort_order = ! empty( $directory_data['sortby_custom_order'] ) ? $directory_data['sortby_custom_order'] : 'CHAR'; $this->joins[] = "LEFT JOIN {$wpdb->prefix}um_metadata umm_sort ON ( umm_sort.user_id = u.ID AND umm_sort.um_key = '{$sortby}' )"; $custom_sort_type = ! empty( $directory_data['sortby_custom_type'] ) ? $directory_data['sortby_custom_type'] : 'CHAR'; + if ( ! empty( $directory_data['sorting_fields'] ) ) { + // phpcs:disable WordPress.Security.NonceVerification -- already verified here + $sorting = sanitize_text_field( $_POST['sorting'] ); + $sorting_fields = unserialize( $directory_data['sorting_fields'] ); + // phpcs:enable WordPress.Security.NonceVerification + foreach ( $sorting_fields as $field ) { + if ( isset( $field[ $sorting ] ) ) { + $custom_sort_type = $field['type']; + $custom_sort_order = $field['order']; + } + } + } if ( 'NUMERIC' === $custom_sort_type ) { $custom_sort_type = 'DECIMAL'; } $custom_sort_type = apply_filters( 'um_member_directory_custom_sorting_type', $custom_sort_type, $sortby, $directory_data ); - $custom_sort_order = ! empty( $directory_data['sortby_custom_order'] ) ? $directory_data['sortby_custom_order'] : 'CHAR'; - $this->sql_order = " ORDER BY CAST( umm_sort.um_value AS {$custom_sort_type} ) {$custom_sort_order} "; } elseif ( count( $numeric_sorting_keys ) && in_array( $sortby, $numeric_sorting_keys ) ) { From 568b56d267841e39927ba2b01d3398fefd83c92a Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 24 May 2023 16:18:08 +0300 Subject: [PATCH 6/7] - fix small errors --- includes/admin/assets/css/um-admin-forms.css | 8 ++++ includes/admin/assets/js/um-admin-forms.js | 10 ++-- includes/admin/core/class-admin-forms.php | 48 ++++++++++++-------- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/includes/admin/assets/css/um-admin-forms.css b/includes/admin/assets/css/um-admin-forms.css index 36692707..6beb8ecf 100644 --- a/includes/admin/assets/css/um-admin-forms.css +++ b/includes/admin/assets/css/um-admin-forms.css @@ -146,6 +146,14 @@ textarea.um-forms-field.um-small-field { flex: 0.9; } +.um-multi-selects-option-line .um-field-wrapper.um-custom-order-fields label select{ + width: auto; + display: inline; + font-weight: normal; + max-width: 70%; + flex: 0.9; +} + .um-multi-selects-option-line.um-admin-drag-fld .um-field-wrapper { width: calc( 100% - 90px ); } diff --git a/includes/admin/assets/js/um-admin-forms.js b/includes/admin/assets/js/um-admin-forms.js index f47f8017..74d47bcc 100644 --- a/includes/admin/assets/js/um-admin-forms.js +++ b/includes/admin/assets/js/um-admin-forms.js @@ -250,7 +250,7 @@ jQuery(document).ready( function() { '' + wp.i18n.__( 'Remove', 'ultimate-member' ) + '' + '' + '' + - '' + '' + '' + '' + @@ -260,11 +260,11 @@ jQuery(document).ready( function() { '' + '' + '' + - '' + - '' + + '' + + '' + '' + ''; list.append( html ); @@ -274,6 +274,8 @@ jQuery(document).ready( function() { jQuery( '#' + list.data('id_attr') + '-' + k ).parents('li').find('.um-field-wrapper.um-custom-order-fields input[name="meta_key"]').attr('name', 'um_metadata[_um_sorting_fields][other_data][' + k + '][meta_key]'); jQuery( '#' + list.data('id_attr') + '-' + k ).parents('li').find('.um-field-wrapper.um-custom-order-fields input[name="label"]').attr('name', 'um_metadata[_um_sorting_fields][other_data][' + k + '][label]'); + jQuery( '#' + list.data('id_attr') + '-' + k ).parents('li').find('.um-field-wrapper.um-custom-order-fields select[name="data_type"]').attr('name', 'um_metadata[_um_sorting_fields][other_data][' + k + '][data_type]'); + jQuery( '#' + list.data('id_attr') + '-' + k ).parents('li').find('.um-field-wrapper.um-custom-order-fields select[name="order"]').attr('name', 'um_metadata[_um_sorting_fields][other_data][' + k + '][order]'); }); diff --git a/includes/admin/core/class-admin-forms.php b/includes/admin/core/class-admin-forms.php index c5e30524..68995432 100644 --- a/includes/admin/core/class-admin-forms.php +++ b/includes/admin/core/class-admin-forms.php @@ -1594,14 +1594,24 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { $other_label = ''; $other_type = ''; $other_order = ''; + if ( is_array( $value ) ) { $keys = array_keys( $value ); $other_key = $keys[0]; - $labels = array_values( $value ); - $other_label = $labels[0]; - $other_type = $value['type']; - $other_order = $value['order']; + if ( ! empty( $value['label'] ) ) { + $other_label = $value['label']; + } else { + $labels = array_values( $value ); + $other_label = $labels[0]; + } + + if ( ! empty( $value['type'] ) ) { + $other_type = $value['type']; + } + if ( ! empty( $value['order'] ) ) { + $other_order = $value['order']; + } } else { if ( ! in_array( $value, array_keys( $field_data['options'] ) ) ) { continue; @@ -1629,21 +1639,21 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { ' . __( 'Remove', 'ultimate-member' ) . ' - - + + '; } From 30663c3ecddd74b4bcdff7b717ca6ee40241289a Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 12 Jun 2023 13:20:00 +0300 Subject: [PATCH 7/7] - reviewed #1190; --- includes/admin/assets/js/um-admin-forms.js | 15 ++--- includes/admin/class-admin.php | 3 - includes/admin/core/class-admin-enqueue.php | 1 + includes/admin/core/class-admin-forms.php | 24 +++---- .../admin/templates/directory/sorting.php | 18 +---- includes/class-config.php | 7 +- includes/core/class-member-directory-meta.php | 52 +++++++------- includes/core/class-member-directory.php | 67 ++++++++++++++----- 8 files changed, 104 insertions(+), 83 deletions(-) diff --git a/includes/admin/assets/js/um-admin-forms.js b/includes/admin/assets/js/um-admin-forms.js index 74d47bcc..c317cbd8 100644 --- a/includes/admin/assets/js/um-admin-forms.js +++ b/includes/admin/assets/js/um-admin-forms.js @@ -245,21 +245,18 @@ jQuery(document).ready( function() { html += ''; } + let dataTypesOptions = ''; + jQuery.each( um_forms_data.md_sorting_data_types, function( key, label ) { + dataTypesOptions += ''; + } ); + html += '' + selector_html + '' + '' + '' + wp.i18n.__( 'Remove', 'ultimate-member' ) + '' + '' + '' + '' + ' ' . __( 'Remove', 'ultimate-member' ) . ' - +