diff --git a/inc/Ui/Search.php b/inc/Ui/Search.php index 5ac9a6ef14cdded749b867cb22c0d5e9e8d76022..8bb1913e32c70d833701501251a23bfbedeccbbb 100644 --- a/inc/Ui/Search.php +++ b/inc/Ui/Search.php @@ -235,12 +235,17 @@ class Search extends Ui ]; // detect current - $activeOption = 'exact'; + $activeOption = 'custom'; foreach ($options as $key => $option) { if ($this->parsedQuery['and'] === $option['and']) { $activeOption = $key; } } + if ($activeOption === 'custom') { + $options = array_merge(['custom' => [ + 'label' => $lang['search_custom_match'], + ]], $options); + } $searchForm->addTagOpen('div')->addClass('search-tool js-search-tool'); // render current diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 4f388c17a32ce27feef8ae357e61173faecf8264..c2c4eb8e517b873c6299756064df0bbd3797e6e6 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -75,6 +75,7 @@ $lang['search_exact_match'] = 'Exact match'; $lang['search_starts_with'] = 'Starts with'; $lang['search_ends_with'] = 'Ends with'; $lang['search_contains'] = 'Contains'; +$lang['search_custom_match'] = 'Custom'; $lang['search_any_ns'] = 'Any namespace'; $lang['search_any_time'] = 'Any time'; $lang['search_past_7_days'] = 'Past week';