mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 22:23:37 +09:00
- visual improvements for member directory;
- fixed must search/filter option;
This commit is contained in:
@@ -59,33 +59,33 @@ foreach ( $view_types_options as $key => $value ) {
|
||||
'conditional' => array( implode( '|', $conditional ), '~', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_roles',
|
||||
'type' => 'multi_checkbox',
|
||||
'label' => __( 'User Roles to Display', 'ultimate-member' ),
|
||||
'tooltip' => __( 'If you do not want to show all members, select only user roles to appear in this directory', 'ultimate-member' ),
|
||||
'options' => UM()->roles()->get_roles(),
|
||||
'id' => '_um_roles',
|
||||
'type' => 'multi_checkbox',
|
||||
'label' => __( 'User Roles to Display', 'ultimate-member' ),
|
||||
'tooltip' => __( 'If you do not want to show all members, select only user roles to appear in this directory', 'ultimate-member' ),
|
||||
'options' => UM()->roles()->get_roles(),
|
||||
'columns' => 3,
|
||||
'value' => $_um_roles_value,
|
||||
'value' => $_um_roles_value,
|
||||
),
|
||||
array(
|
||||
'id' => '_um_has_profile_photo',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Only show members who have uploaded a profile photo', 'ultimate-member' ),
|
||||
'tooltip' => __( 'If \'Use Gravatars\' as profile photo is enabled, this option is ignored', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_has_profile_photo' ),
|
||||
'id' => '_um_has_profile_photo',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Only show members who have uploaded a profile photo', 'ultimate-member' ),
|
||||
'tooltip' => __( 'If \'Use Gravatars\' as profile photo is enabled, this option is ignored', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_has_profile_photo' ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_has_cover_photo',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Only show members who have uploaded a cover photo', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_has_cover_photo' ),
|
||||
'id' => '_um_has_cover_photo',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Only show members who have uploaded a cover photo', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_has_cover_photo' ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_show_these_users',
|
||||
'type' => 'textarea',
|
||||
'label' => __( 'Only show specific users (Enter one username per line)', 'ultimate-member' ),
|
||||
'value' => $show_these_users,
|
||||
)
|
||||
'id' => '_um_show_these_users',
|
||||
'type' => 'textarea',
|
||||
'label' => __( 'Only show specific users (Enter one username per line)', 'ultimate-member' ),
|
||||
'value' => $show_these_users,
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -111,9 +111,9 @@ foreach ( $view_types_options as $key => $value ) {
|
||||
$fields = apply_filters( 'um_admin_extend_directory_options_general', $fields );
|
||||
|
||||
UM()->admin_forms( array(
|
||||
'class' => 'um-member-directory-general um-half-column',
|
||||
'prefix_id' => 'um_metadata',
|
||||
'fields' => $fields
|
||||
'class' => 'um-member-directory-general um-half-column',
|
||||
'prefix_id' => 'um_metadata',
|
||||
'fields' => $fields
|
||||
) )->render_form(); ?>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
|
||||
@@ -5,29 +5,10 @@ global $post_id; ?>
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
<?php
|
||||
/*$_um_roles_search_value = array();
|
||||
$_um_roles_search = get_post_meta( $post_id, '_um_roles_can_search', true );
|
||||
if ( ! empty( $_um_roles_search ) ) {
|
||||
foreach ( UM()->roles()->get_roles() as $key => $value ) {
|
||||
if ( in_array( $key, array_keys( $_um_roles_search ) ) ) {
|
||||
$_um_roles_search_value[] = $key;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
$_um_roles_search_value = get_post_meta( $post_id, '_um_roles_can_search', true );
|
||||
$_um_roles_search_value = empty( $_um_roles_search_value ) ? array() : $_um_roles_search_value;
|
||||
|
||||
/*$_um_roles_filter_value = array();
|
||||
$_um_roles_filter = get_post_meta( $post_id, '_um_roles_can_filter', true );
|
||||
if ( ! empty( $_um_roles_filter ) ) {
|
||||
foreach ( UM()->roles()->get_roles() as $key => $value ) {
|
||||
if ( in_array( $key, array_keys( $_um_roles_filter ) ) ) {
|
||||
$_um_roles_filter_value[] = $key;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
$_um_roles_filter_value = get_post_meta( $post_id, '_um_roles_can_filter', true );
|
||||
$_um_roles_filter_value = empty( $_um_roles_filter_value ) ? array() : $_um_roles_filter_value;
|
||||
|
||||
@@ -53,7 +34,7 @@ global $post_id; ?>
|
||||
* ?>
|
||||
*/
|
||||
$custom_search = apply_filters( 'um_admin_custom_search_filters', array() );
|
||||
$searchable_fields = UM()->builtin()->all_user_fields('date,time,url');
|
||||
$searchable_fields = UM()->builtin()->all_user_fields( 'date,time,url' );
|
||||
$searchable_fields = $searchable_fields + $custom_search;
|
||||
$user_fields = array();
|
||||
foreach ( $searchable_fields as $key => $arr ) {
|
||||
|
||||
Reference in New Issue
Block a user