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.

Built from https://develop.svn.wordpress.org/trunk@31959


git-svn-id: http://core.svn.wordpress.org/trunk@31938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-04-01 16:17:28 +00:00
parent 5855cb0e60
commit 62279ae07d
2 changed files with 3 additions and 2 deletions

View File

@ -183,6 +183,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$class = ' class="current"';
$status_links['mine'] = "<a href='edit.php?post_type=$post_type&author=$current_user_id'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . '</a>';
$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"';
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta3-31958';
$wp_version = '4.2-beta3-31959';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.