Make WordPress Core

Ticket #17859: 17859.2.diff

File 17859.2.diff, 920 bytes (added by kawauso, 14 years ago)

Add all missing post statuses

  • wp-admin/admin-ajax.php

     
    12921292        if ( count($search_terms) > 1 && $search_terms[0] != $s )
    12931293                $search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')";
    12941294
    1295         $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" );
     1295        $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('publish', 'private', 'future', 'pending', 'draft') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" );
    12961296
    12971297        if ( ! $posts ) {
    12981298                $posttype = get_post_type_object($what);