mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 06:03:38 +09:00
fix callback func in members directory search
This commit is contained in:
@@ -88,14 +88,14 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Prepare filter data
|
||||
*
|
||||
* @param $filter
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
function prepare_filter( $filter ) {
|
||||
$fields = UM()->builtin()->all_user_fields;
|
||||
$fields = UM()->builtin()->all_user_fields;
|
||||
|
||||
if ( isset( $fields[ $filter ] ) ) {
|
||||
$attrs = $fields[ $filter ];
|
||||
@@ -223,7 +223,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
||||
}
|
||||
|
||||
return compact( 'type', 'attrs' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show filter
|
||||
@@ -231,11 +231,11 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
||||
* @param $filter
|
||||
*/
|
||||
function show_filter( $filter ) {
|
||||
/**
|
||||
* @var $type
|
||||
* @var $attrs
|
||||
*/
|
||||
extract( $this->prepare_filter( $filter ) );
|
||||
/**
|
||||
* @var $type
|
||||
* @var $attrs
|
||||
*/
|
||||
extract( $this->prepare_filter( $filter ) );
|
||||
|
||||
switch ( $type ) {
|
||||
|
||||
@@ -243,9 +243,9 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
||||
|
||||
?>
|
||||
|
||||
<select name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" class="um-s1" style="width: 100%" data-placeholder="<?php echo __( stripslashes( $attrs['label'] ), 'ultimate-member' ); ?>" <?php if ( ! empty( $attrs['custom_dropdown_options_source'] ) ) { ?> data-um-ajax-source="<?php echo $attrs['custom_dropdown_options_source'] ?>"<?php } ?>>
|
||||
<select name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" class="um-s1" style="width: 100%" data-placeholder="<?php echo __( stripslashes( $attrs['label'] ), 'ultimate-member' ); ?>" <?php if ( ! empty( $attrs['custom_dropdown_options_source'] ) ) { ?> data-um-parent="<?php echo $attrs['parent_dropdown_relationship']; ?>" data-mebers-directory="yes" data-um-ajax-source="<?php echo $attrs['custom_dropdown_options_source'] ?>"<?php } ?>>
|
||||
|
||||
<option></option>
|
||||
<option></option>
|
||||
|
||||
<?php foreach ( $attrs['options'] as $k => $v ) {
|
||||
|
||||
@@ -259,13 +259,14 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
||||
if ( isset( $attrs['custom'] ) )
|
||||
$opt = $k;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<option value="<?php echo $opt; ?>" <?php um_select_if_in_query_params( $filter, $opt ); ?>><?php echo __( $v, 'ultimate-member'); ?></option>
|
||||
<option value="<?php echo $opt; ?>" <?php um_select_if_in_query_params( $filter, $opt ); ?> <?php selected( $_GET[$filter], $v ) ?>><?php echo __( $v, 'ultimate-member'); ?></option>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</select>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -275,7 +276,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
||||
|
||||
?>
|
||||
|
||||
<input type="text" autocomplete="off" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo isset( $attrs['label'] ) ? __( $attrs['label'], 'ultimate-member') : ''; ?>" value='<?php echo esc_attr( um_queried_search_value( $filter, false ) ); ?>' />
|
||||
<input type="text" autocomplete="off" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo isset( $attrs['label'] ) ? __( $attrs['label'], 'ultimate-member') : ''; ?>" value='<?php echo esc_attr( um_queried_search_value( $filter, false ) ); ?>' />
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
Reference in New Issue
Block a user