Skip to content

Commit

Permalink
Update Actions.php
Browse files Browse the repository at this point in the history
Convert queries to lowercase and remove trailing whitespace to ensure same terms are grouped together
  • Loading branch information
pau1phi11ips authored Nov 12, 2024
1 parent deed8ae commit 4e5b9ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public function maybe_register_assets() {
$data = wp_json_encode(
[
'props' => [
'search_query' => trim(get_search_query()),
// convert queries to lowercase and remove trailing whitespace to ensure same terms are grouped together
'search_query' => strtolower(trim(get_search_query())),
'result_count' => $wp_query->found_posts,
],
]
Expand Down

0 comments on commit 4e5b9ac

Please sign in to comment.