From 8f8c526a569a95790b42e8fa297c4f022c206977 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 1 Apr 2015 16:17:01 +0000 Subject: [PATCH] In `WP_Posts_List_Table::get_views()`, don't add the `current` class to the `all` status link if `->user_posts_count` has a value, which triggers the additional `mine` status. See [31828]. Fixes #24869. git-svn-id: https://develop.svn.wordpress.org/trunk@31959 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-posts-list-table.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index 1779887d94..cfbe8e37ae 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -183,6 +183,7 @@ class WP_Posts_List_Table extends WP_List_Table { $class = ' class="current"'; $status_links['mine'] = "" . sprintf( _nx( 'Mine (%s)', 'Mine (%s)', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . ''; $allposts = '&all_posts=1'; + $class = ''; } $total_posts = array_sum( (array) $num_posts ); @@ -191,7 +192,7 @@ class WP_Posts_List_Table extends WP_List_Table { foreach ( get_post_stati( array('show_in_admin_all_list' => false) ) as $state ) $total_posts -= $num_posts->$state; - if ( empty( $class ) && $this->is_base_request() ) { + if ( empty( $class ) && $this->is_base_request() && ! $this->user_posts_count ) { $class = ' class="current"'; }