Fix users.php paging. Props DD32. fixes #4017
git-svn-id: http://svn.automattic.com/wordpress/trunk@8195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
061e9c8097
commit
3f24ac2605
|
@ -354,12 +354,18 @@ class WP_User_Search {
|
||||||
|
|
||||||
function do_paging() {
|
function do_paging() {
|
||||||
if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
|
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(
|
$this->paging_text = paginate_links( array(
|
||||||
'total' => ceil($this->total_users_for_query / $this->users_per_page),
|
'total' => ceil($this->total_users_for_query / $this->users_per_page),
|
||||||
'current' => $this->page,
|
'current' => $this->page,
|
||||||
'base' => 'users.php?%_%',
|
'base' => 'users.php?%_%',
|
||||||
'format' => 'userspage=%#%',
|
'format' => 'userspage=%#%',
|
||||||
'add_args' => array( 'usersearch' => urlencode($this->search_term) )
|
'add_args' => $args
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue