feat(navigation): hard-switch to Zibll navigation and Font Awesome 5
This commit is contained in:
1 parent
3c3ddac8be
commit
a0b84977a2
630 files changed
+101647
-11293
No files matched your search
@@ -223,7 +223,8 @@ add_action('init', function () {
|
||||
add_filter('query_vars', function ($vars) {
|
||||
$vars[] = 'aksrt_is_resource_archive';
|
||||
$vars[] = 'aksrt_legacy_resource';
|
||||
$vars[] = 'aksrt_search_type';
|
||||
$vars[] = 'type';
|
||||
$vars[] = 'trem';
|
||||
return $vars;
|
||||
});
|
||||
|
||||
@@ -331,7 +332,11 @@ add_action('pre_get_posts', function ($query) {
|
||||
|
||||
// 站内搜索:分类/标签名搜索(内容类型始终为 post)
|
||||
if ($query->is_search() && empty($query->get('post_type'))) {
|
||||
$search_type = sanitize_key((string) $query->get('aksrt_search_type'));
|
||||
$search_type = sanitize_key((string) $query->get('type'));
|
||||
$trem = absint($query->get('trem'));
|
||||
if ($trem > 0) {
|
||||
$query->set('cat', $trem);
|
||||
}
|
||||
|
||||
if (in_array($search_type, ['category', 'tag'], true)) {
|
||||
$taxonomy = $search_type === 'category' ? 'category' : 'post_tag';
|
||||
|
||||
Reference in new issue
Block a user