Ticket #12692: 12692.diff
File 12692.diff, 1.6 KB (added by , 15 years ago) |
---|
-
wp-admin/edit.php
143 143 144 144 $user_posts = false; 145 145 if ( !current_user_can($post_type_object->edit_others_cap) ) { 146 $user_posts_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(1) FROM $wpdb->posts WHERE post_type = '%s' AND post_status != 'trash' AND post_ author = %d", $post_type, $current_user->ID) );146 $user_posts_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(1) FROM $wpdb->posts WHERE post_type = '%s' AND post_status != 'trash' AND post_status != 'auto-draft' AND post_author = %d", $post_type, $current_user->ID) ); 147 147 $user_posts = true; 148 148 if ( $user_posts_count && empty($_GET['post_status']) && empty($_GET['all_posts']) && empty($_GET['author']) ) 149 149 $_GET['author'] = $current_user->ID; … … 226 226 if ( $user_posts ) { 227 227 if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user->ID ) ) 228 228 $class = ' class="current"'; 229 $status_links[] = "<li><a href='edit.php? author=$current_user->ID'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '</a>';229 $status_links[] = "<li><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>', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '</a>'; 230 230 $allposts = '&all_posts=1'; 231 231 } 232 232