Make WordPress Core


Ignore:
Timestamp:
03/10/2010 08:41:09 AM (14 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r13537 r13643  
    354354
    355355<?php if ( $page_links ) { ?>
    356 <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
    357     number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ),
    358     number_format_i18n( min( $pagenum * $per_page, $wp_query->found_posts ) ),
    359     number_format_i18n( $wp_query->found_posts ),
    360     $page_links
    361 ); echo $page_links_text; ?></div>
     356<div class="tablenav-pages"><?php
     357    $count_posts = $post_type_object->hierarchical ? $wp_query->post_count : $wp_query->found_posts;
     358    $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
     359                        number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ),
     360                        number_format_i18n( min( $pagenum * $per_page, $count_posts ) ),
     361                        number_format_i18n( $count_posts ),
     362                        $page_links
     363                        );
     364    echo $page_links_text;
     365    ?></div>
    362366<?php } ?>
    363367
Note: See TracChangeset for help on using the changeset viewer.