mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 20:53:39 +09:00
- fix warning member directory
- enable search member directory by default
This commit is contained in:
@@ -145,7 +145,7 @@ if ( ! class_exists( 'um\Config' ) ) {
|
||||
'_um_show_social' => 0,
|
||||
'_um_show_userinfo' => 0,
|
||||
'_um_show_tagline' => 0,
|
||||
'_um_search' => 0,
|
||||
'_um_search' => 1,
|
||||
'_um_userinfo_animate' => '1',
|
||||
'_um_sortby' => 'user_registered_desc',
|
||||
'_um_profile_photo' => '1',
|
||||
|
||||
@@ -275,12 +275,14 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
|
||||
$this->filter_supported_fields = apply_filters( 'um_members_directory_custom_field_types_supported_filter', array( 'date', 'time', 'select', 'multiselect', 'radio', 'checkbox', 'rating' ) );
|
||||
|
||||
foreach ( UM()->builtin()->saved_fields as $key => $data ) {
|
||||
if ( isset( $data['type'] ) && in_array( $data['type'], $this->filter_supported_fields ) ) {
|
||||
if ( isset( $data['title'] ) && array_search( $data['title'], $this->filter_fields ) !== false ) {
|
||||
$data['title'] = $data['title'] . ' (' . $key . ')';
|
||||
if ( UM()->builtin()->saved_fields ) {
|
||||
foreach ( UM()->builtin()->saved_fields as $key => $data ) {
|
||||
if ( isset( $data['type'] ) && in_array( $data['type'], $this->filter_supported_fields ) ) {
|
||||
if ( isset( $data['title'] ) && array_search( $data['title'], $this->filter_fields ) !== false ) {
|
||||
$data['title'] = $data['title'] . ' (' . $key . ')';
|
||||
}
|
||||
$this->filter_fields[ $key ] = isset( $data['title'] ) ? $data['title'] : $data['label'];
|
||||
}
|
||||
$this->filter_fields[ $key ] = isset( $data['title'] ) ? $data['title'] : $data['label'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user