mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-12 19:26:35 +09:00
- member directory;
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -275,7 +275,7 @@ 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' ) );
|
||||
|
||||
if ( UM()->builtin()->saved_fields ) {
|
||||
if ( ! empty( 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 ) {
|
||||
|
||||
@@ -50,7 +50,7 @@ if ( count( $args['view_types'] ) == 1 ) {
|
||||
$default_sorting = ! empty( $args['sortby'] ) ? $args['sortby'] : 'user_registered_desc';
|
||||
|
||||
$sort_from_url = '';
|
||||
if ( isset( $args['enable_sorting'] ) ) {
|
||||
if ( ! empty( $args['enable_sorting'] ) ) {
|
||||
$sorting_options = empty( $args['sorting_fields'] ) ? array() : $args['sorting_fields'];
|
||||
if ( ! in_array( $default_sorting, $sorting_options ) ) {
|
||||
$sorting_options[] = $default_sorting;
|
||||
@@ -107,7 +107,7 @@ if ( ! $single_view ) {
|
||||
$classes .= ' um-member-with-view';
|
||||
}
|
||||
|
||||
if ( isset( $args['enable_sorting'] ) && ! empty( $sorting_options ) && count( $sorting_options ) > 1 ) {
|
||||
if ( ! empty( $args['enable_sorting'] ) && ! empty( $sorting_options ) && count( $sorting_options ) > 1 ) {
|
||||
$classes .= ' um-member-with-sorting';
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ UM()->get_template( 'members-pagination.php', '', $args, true ); ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if ( isset( $args['enable_sorting'] ) && ! empty( $sorting_options ) && count( $sorting_options ) > 1 ) { ?>
|
||||
if ( ! empty( $args['enable_sorting'] ) && ! empty( $sorting_options ) && count( $sorting_options ) > 1 ) { ?>
|
||||
<div class="um-member-directory-sorting">
|
||||
<select class="um-s3 um-member-directory-sorting-options" id="um-member-directory-sorting-select-<?php echo esc_attr( $form_id ) ?>" data-placeholder="<?php esc_attr_e( 'Sort By', 'ultimate-member' ); ?>">
|
||||
<?php foreach ( $sorting_options as $value => $title ) { ?>
|
||||
|
||||
Reference in New Issue
Block a user