- fixed some colors in CSS;

- fixed RTL layouts;
- fixed must search attr;
- fixed show only these users attr;
- changed CSS for fields (1px border);
- fixed UM dropdown JS for position;
This commit is contained in:
nikitasinelnikov
2019-09-11 16:07:51 +03:00
parent 6eb47f2368
commit 5241b95a98
12 changed files with 82 additions and 68 deletions
+14 -8
View File
@@ -941,17 +941,23 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
* @param array $directory_data
*/
function show_only_these_users( $directory_data ) {
if ( ! empty( $directory_data['show_these_users'] ) && is_array( $directory_data['show_these_users'] ) ) {
$users_array = array();
if ( ! empty( $directory_data['show_these_users'] ) ) {
$show_these_users = maybe_unserialize( $directory_data['show_these_users'] );
foreach ( $directory_data['show_these_users'] as $username ) {
if ( false !== ( $exists_id = username_exists( $username ) ) ) {
$users_array[] = $exists_id;
if ( is_array( $show_these_users ) && ! empty( $show_these_users ) ) {
$users_array = array();
foreach ( $show_these_users as $username ) {
if ( false !== ( $exists_id = username_exists( $username ) ) ) {
$users_array[] = $exists_id;
}
}
if ( ! empty( $users_array ) ) {
$this->query_args['include'] = $users_array;
}
}
if ( ! empty( $users_array ) ) {
$this->query_args['include'] = $users_array;
}
}
}