diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index db44ae967c..4ea84145ef 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -45,18 +45,18 @@ printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matchin $avail_post_stati = get_available_post_statuses('page'); $status_links = array(); +$num_posts = wp_count_posts('page'); foreach ( $post_stati as $status => $label ) { $class = ''; if ( !in_array($status, $avail_post_stati) ) continue; - - $num_posts = wp_count_posts('page', $status); + if ( $status == $_GET['post_status'] ) $class = ' class="current"'; $status_links[] = "
  • " . - sprintf($label[2], $num_posts) . ''; + sprintf($label[2], $num_posts->$status) . ''; } $class = empty($_GET['post_status']) ? ' class="current"' : ''; $status_links[] = "
  • All Pages"; diff --git a/wp-admin/edit.php b/wp-admin/edit.php index ccf01f7b41..d0895fad8c 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -52,18 +52,18 @@ if ( is_single() ) {