mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed members search;
This commit is contained in:
@@ -176,7 +176,7 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
||||
$request = wp_remote_post(
|
||||
'https://ultimatemember.com/',
|
||||
array(
|
||||
'timeout' => 15,
|
||||
'timeout' => 45,
|
||||
'sslverify' => false,
|
||||
'body' => $api_params
|
||||
)
|
||||
|
||||
@@ -146,11 +146,11 @@ function um_add_search_to_query( $query_args, $args ){
|
||||
'relation' => 'OR',
|
||||
);
|
||||
|
||||
if ( $filter_data['attrs']['type'] == 'multiselect' ) {
|
||||
if ( $filter_data['attrs']['type'] == 'multiselect' || $filter_data['attrs']['type'] == 'radio' || $filter_data['attrs']['type'] == 'checkbox' ) {
|
||||
$field_query = array_merge( $field_query, array(
|
||||
array(
|
||||
'key' => $field,
|
||||
'value' => '"' . trim( $value ) . '"',
|
||||
'value' => serialize( strval( trim( $value ) ) ),
|
||||
'compare' => 'LIKE',
|
||||
),
|
||||
) );
|
||||
@@ -494,17 +494,4 @@ function um_search_select_fields( $atts ) {
|
||||
|
||||
return $atts;
|
||||
}
|
||||
add_filter( 'um_search_select_fields', 'um_search_select_fields' );
|
||||
|
||||
|
||||
/**
|
||||
* Filter gender query argument
|
||||
*
|
||||
* @param array $field_query
|
||||
* @return array
|
||||
*/
|
||||
function um_query_args_gender__filter( $field_query ) {
|
||||
unset( $field_query[1] );
|
||||
return $field_query;
|
||||
}
|
||||
add_filter( 'um_query_args_gender__filter', 'um_query_args_gender__filter' );
|
||||
add_filter( 'um_search_select_fields', 'um_search_select_fields' );
|
||||
Reference in New Issue
Block a user