Align search experience with settings
This commit is contained in:
1 parent
f3e04b6598
commit
6ff2d15c5a
8 files changed
+555
-139
No files matched your search
@@ -234,10 +234,12 @@ class AKSRT_Settings_Theme_Search {
|
||||
$all = AKSRT_Settings::get_all();
|
||||
foreach ($all_types as $type => $key) {
|
||||
$default_on = in_array($type, ['post', 'category', 'tag'], true);
|
||||
if (!isset($all[$key]) || !empty($all[$key]) && $default_on) {
|
||||
if (!empty(AKSRT_Settings::get_value($key, $default_on))) {
|
||||
$enabled[] = $type;
|
||||
}
|
||||
$is_enabled = array_key_exists($key, $all)
|
||||
? !empty(AKSRT_Settings::get_value($key, $default_on))
|
||||
: $default_on;
|
||||
|
||||
if ($is_enabled) {
|
||||
$enabled[] = $type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user