From 3997ae46fa21641c5c6af698143e83988a9b6792 Mon Sep 17 00:00:00 2001 From: Ultimate Member Date: Fri, 11 Dec 2015 19:30:33 +0200 Subject: [PATCH] Adding some code to support members filtering --- core/um-actions-members.php | 10 +++++++++- um-init.php | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/um-actions-members.php b/core/um-actions-members.php index 3fe7ee1a..a0093186 100644 --- a/core/um-actions-members.php +++ b/core/um-actions-members.php @@ -94,7 +94,15 @@ global $ultimatemember; extract( $args ); - if ( um_members('header') && isset($_REQUEST['um_search']) && um_members('users_per_page') ) { ?> + if ( isset($_REQUEST['um_search']) ) { + $is_filtering = 1; + } else if ( $ultimatemember->is_filtering == 1 ) { + $is_filtering = 1; + } else { + $is_filtering = 0; + } + + if ( um_members('header') && $is_filtering && um_members('users_per_page') ) { ?>
diff --git a/um-init.php b/um-init.php index 8b4be14b..c5ba1b24 100644 --- a/um-init.php +++ b/um-init.php @@ -2,7 +2,11 @@ class UM_API { + public $is_filtering; + function __construct() { + + $this->is_filtering = 0; require_once um_path . 'core/um-short-functions.php';