WordPress.org

Make WordPress Core

Ticket #17152: 17152.diff

File 17152.diff, 714 bytes (added by scribu, 4 years ago)
  • wp-includes/query.php

     
    21552155                                $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))"; 
    21562156                                $searchand = ' AND '; 
    21572157                        } 
    2158                         $term = esc_sql( like_escape( $q['s'] ) ); 
    2159                         if ( empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) 
    2160                                 $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')"; 
    21612158 
    21622159                        if ( !empty($search) ) { 
    21632160                                $search = " AND ({$search}) ";