public 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' =>
$args ) );
if ( $this->paging_text
) { $this->paging_text =
sprintf( /* translators: 1: Starting number of users on the current page, 2: Ending number of users, 3: Total number of users. */
'<span class="displaying-num">' .
__( 'Displaying %1$s–%2$s of %3$s'
) . '</span>%s',
number_format_i18n( ( $this->page - 1
) *
$this->users_per_page + 1
),