Changeset 13957
- Timestamp:
- 04/03/2010 05:19:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r13916 r13957 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 NOT IN ('trash', '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']) ) … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.