From 2323aba55f59cbb1866f96b16eb0c14ec2ccb328 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 25 Jun 2008 17:02:17 +0000 Subject: [PATCH] Fix users.php paging. Props DD32. fixes #4017 git-svn-id: https://develop.svn.wordpress.org/trunk@8195 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/user.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 154ba1af33..21073babaa 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -354,12 +354,18 @@ class WP_User_Search { function do_paging() { if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results + $args = array(); + if( ! empty($this->search_term) ) + $args['usersearch'] = urlencode($this->search_term); + if( ! empty($this->role) ) + $args['role'] = urlencode($this->role); + $this->paging_text = paginate_links( array( 'total' => ceil($this->total_users_for_query / $this->users_per_page), 'current' => $this->page, 'base' => 'users.php?%_%', 'format' => 'userspage=%#%', - 'add_args' => array( 'usersearch' => urlencode($this->search_term) ) + 'add_args' => $args ) ); } }