Make WordPress Core


Ignore:
Timestamp:
04/01/2015 04:17:01 PM (10 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r31890 r31959  
    184184            $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>';
    185185            $allposts = '&all_posts=1';
     186            $class = '';
    186187        }
    187188
     
    192193            $total_posts -= $num_posts->$state;
    193194
    194         if ( empty( $class ) && $this->is_base_request() ) {
     195        if ( empty( $class ) && $this->is_base_request() && ! $this->user_posts_count ) {
    195196            $class =  ' class="current"';
    196197        }
Note: See TracChangeset for help on using the changeset viewer.