mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix search member filter and fields
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
<?php if ( isset( $_REQUEST['page_id'] ) && get_option('permalink_structure') == 0 ) { ?>
|
||||
|
||||
<input type="hidden" name="page_id" id="page_id" value="<?php echo $_REQUEST['page_id']; ?>" />
|
||||
<input type="hidden" name="page_id" id="page_id" value="<?php echo esc_attr( $_REQUEST['page_id']); ?>" />
|
||||
|
||||
<?php }
|
||||
|
||||
|
||||
+3
-3
@@ -125,7 +125,7 @@ class UM_Members {
|
||||
|
||||
?>
|
||||
|
||||
<input type="text" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo isset( $attrs['label'] ) ? $attrs['label'] : ''; ?>" value="<?php um_queried_search_value( $filter ); ?>" />
|
||||
<input type="text" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo isset( $attrs['label'] ) ? $attrs['label'] : ''; ?>" value='<?php echo esc_attr( um_queried_search_value( $filter, false ) ); ?>' />
|
||||
|
||||
<?php
|
||||
|
||||
@@ -140,14 +140,14 @@ class UM_Members {
|
||||
***/
|
||||
function get_members($args){
|
||||
|
||||
global $ultimatemember;
|
||||
global $ultimatemember, $wpdb;
|
||||
|
||||
extract($args);
|
||||
|
||||
$query_args = array();
|
||||
$query_args = apply_filters( 'um_prepare_user_query_args', $query_args, $args );
|
||||
$users = new WP_User_Query( $query_args );
|
||||
|
||||
|
||||
// number of profiles for mobile
|
||||
if ( $ultimatemember->mobile->isMobile() && isset( $profiles_per_page_mobile ) )
|
||||
$profiles_per_page = $profiles_per_page_mobile;
|
||||
|
||||
@@ -626,15 +626,22 @@ function um_profile_id() {
|
||||
/***
|
||||
*** @Check value of queried search in text input
|
||||
***/
|
||||
function um_queried_search_value( $filter ) {
|
||||
function um_queried_search_value( $filter, $echo = true ) {
|
||||
global $ultimatemember;
|
||||
$value = '';
|
||||
if ( isset($_REQUEST['um_search']) ) {
|
||||
$query = $ultimatemember->permalinks->get_query_array();
|
||||
if ( $query[$filter] != '' ) {
|
||||
echo stripslashes_deep( $query[$filter] );
|
||||
if ( $query[ $filter ] != '' ) {
|
||||
$value = stripslashes_deep( $query[ $filter ] );
|
||||
}
|
||||
}
|
||||
echo '';
|
||||
|
||||
if( $echo ){
|
||||
echo $value;
|
||||
}else{
|
||||
return $value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user