Make WordPress Core


Ignore:
Timestamp:
02/18/2010 08:01:10 PM (14 years ago)
Author:
ryan
Message:

Don't include internal post types in the total. see #9674

File:
1 edited

Legend:

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

    r13172 r13198  
    229229}
    230230
    231 $total_posts = array_sum( (array) $num_posts ) - $num_posts->trash;
     231$total_posts = array_sum( (array) $num_posts );
     232
     233// Subtract post types that are not included in the admin all list.
     234foreach ( get_post_stati( array('show_in_admin_all_list' => false) ) as $state )
     235    $total_posts -= $num_posts->$state;
     236
    232237$class = empty($class) && empty($_GET['post_status']) ? ' class="current"' : '';
    233238$status_links[] = "<li><a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.