Don't include trash posts in the sticky posts count. props garyc40, fixes #15934.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-21 14:58:17 +00:00
parent a8b6d2f512
commit 53895d9778
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( 'post' == $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) {
$sticky_posts = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
$this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND ID IN ($sticky_posts)", $post_type ) );
$this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status != 'trash' AND ID IN ($sticky_posts)", $post_type ) );
}
parent::WP_List_Table( array(