Fix paging links "Displaying x–y of z" for Pages. Props Utkarsh. Fixes #12552

git-svn-id: https://develop.svn.wordpress.org/trunk@13643 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-03-10 08:41:09 +00:00
parent c2bb5992ee
commit 0b6f00c0c1
1 changed files with 10 additions and 6 deletions

View File

@ -353,12 +353,16 @@ if ( $is_trash && current_user_can($post_type_object->edit_others_cap) ) { ?>
</div>
<?php if ( $page_links ) { ?>
<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ),
number_format_i18n( min( $pagenum * $per_page, $wp_query->found_posts ) ),
number_format_i18n( $wp_query->found_posts ),
$page_links
); echo $page_links_text; ?></div>
<div class="tablenav-pages"><?php
$count_posts = $post_type_object->hierarchical ? $wp_query->post_count : $wp_query->found_posts;
$page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ),
number_format_i18n( min( $pagenum * $per_page, $count_posts ) ),
number_format_i18n( $count_posts ),
$page_links
);
echo $page_links_text;
?></div>
<?php } ?>
<div class="view-switch">