Refactor and enhance member directory search functionality.

Replaced deprecated and complex search query methods with a more streamlined and flexible implementation. Introduced improved handling of core and custom search fields, optimized search logic, and added better filter support. Incremented plugin version to 2.10.2 to reflect these changes.
This commit is contained in:
Mykyta Synelnikov
2025-03-25 23:31:13 +02:00
parent 51dc3b5747
commit 77f6a13730
3 changed files with 127 additions and 180 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
}
$skip_fields = UM()->builtin()->get_fields_without_metakey();
$skip_fields = array_merge( $skip_fields, UM()->member_directory()->core_search_fields );
$skip_fields = array_merge( $skip_fields, UM()->member_directory()::$core_search_fields );
$real_usermeta = $wpdb->get_col( "SELECT DISTINCT meta_key FROM {$wpdb->usermeta}" );
$real_usermeta = ! empty( $real_usermeta ) ? $real_usermeta : array();