Ticket #7815: 7815.diff
File 7815.diff, 1.1 KB (added by , 6 months ago) |
---|
-
inc/search.php
81 81 if ( self::is_search( $query ) ) { 82 82 $join .= " 83 83 LEFT JOIN 84 {$wpdb->term_relationships} ON {$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id84 {$wpdb->term_relationships} AS tr_search ON {$wpdb->posts}.ID = tr_search.object_id 85 85 LEFT JOIN 86 {$wpdb->term_taxonomy} ON {$wpdb->term_taxonomy}.term_taxonomy_id = {$wpdb->term_relationships}.term_taxonomy_id86 {$wpdb->term_taxonomy} AS tt_search ON tt_search.term_taxonomy_id = tr_search.term_taxonomy_id 87 87 LEFT JOIN 88 {$wpdb->terms} ON {$wpdb->terms}.term_id = {$wpdb->term_taxonomy}.term_id88 {$wpdb->terms} AS t_search ON t_search.term_id = tt_search.term_id 89 89 "; 90 90 } 91 91 … … 131 131 if ( $insert_at ) { 132 132 $or_tag = $wpdb->prepare( "OR 133 133 ( 134 {$wpdb->term_taxonomy}.taxonomy = %s134 tt_search.taxonomy = %s 135 135 AND 136 {$wpdb->terms}.name = %s136 t_search.name = %s 137 137 ) ", 138 138 Registrations::get_taxonomy( 'tags' ), 139 139 get_query_var('s')