WordPress.org

Make WordPress Core

Changeset 14567


Ignore:
Timestamp:
05/11/2010 06:38:51 PM (8 years ago)
Author:
ryan
Message:

No need to recount. see #12734

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/nav-menu.php

    r14482 r14567  
    493493    $get_posts = new WP_Query;
    494494    $posts = $get_posts->query( $args );
    495     $count_posts = (int) @count( $posts );
    496     if ( ! $count_posts ) {
     495    if ( ! $get_posts->post_count ) {
    497496        echo '<p>' . __( 'No items.' ) . '</p>';
    498497        return;
     
    503502    $num_pages = $get_posts->max_num_pages;
    504503
    505     if ( isset( $get_posts->found_posts ) && ( $get_posts->found_posts > $count_posts ) ) {
     504    if ( isset( $get_posts->found_posts ) && ( $get_posts->found_posts > $get_posts->post_count ) ) {
    506505        // somewhat like display_page_row(), let's make sure ancestors show up on paged display
    507506        $parent_ids = array();
Note: See TracChangeset for help on using the changeset viewer.