Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In wp-admin/includes/class-wp-posts-list-table.php lines 59-69:

if ( !current_user_can( $post_type_object->cap->edit_others_posts ) ) {
            $exclude_states = get_post_stati( array( 'show_in_admin_all_list' => false ) );
            $this->user_posts_count = $wpdb->get_var( $wpdb->prepare( "
                SELECT COUNT( 1 ) FROM $wpdb->posts
                WHERE post_type = %s AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' )
                AND post_author = %d
            ", $post_type, get_current_user_id() ) );

            if ( $this->user_posts_count && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['all_posts'] ) && empty( $_REQUEST['author'] ) && empty( $_REQUEST['show_sticky'] ) )
                $_GET['author'] = get_current_user_id();
        }

The code above controls the display of 'Mine' tab in the post edit screen (which appears beside: All, Published, Drafts, Pending.. etc):

Apparently, this only show up to users who can't edit_others_posts (Authors and Contributors for example).

Can I change this condition so that 'Mine' tab would show up for all users? Without hacking this code file.

share|improve this question
    
Please edit your question to include your current, relevant code. This question is impossible to answer in a vacuum. –  Chip Bennett Nov 14 '13 at 14:49
    
I don't see that you can "dismiss" that line without hack Core files. Please explain your project and there may be some other solution. –  s_ha_dum Nov 14 '13 at 15:00
    
Just edited the question. –  Ahmed Saad Nov 14 '13 at 18:02
    
Any one can help? –  Ahmed Saad Nov 15 '13 at 13:26
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.