Ticket #20044: 20044.diff

File 20044.diff, 681 bytes (added by kovshenin, 7 months ago)

Adds the page_name column to query's search

  • wp-includes/query.php

     
    21962196                        $searchand = ''; 
    21972197                        foreach( (array) $q['search_terms'] as $term ) { 
    21982198                                $term = esc_sql( like_escape( $term ) ); 
    2199                                 $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))"; 
     2199                                $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_name LIKE '{$n}{$term}{$n}'))"; 
    22002200                                $searchand = ' AND '; 
    22012201                        } 
    22022202