feat(navigation): hard-switch to Zibll navigation and Font Awesome 5
This commit is contained in:
+1
-24
@@ -34,32 +34,9 @@ class Scripts {
|
||||
add_action('wp_footer', [$this, 'output_custom_footer_codes'], 99);
|
||||
add_action('wp_ajax_aksrt_frontend_debug', [$this, 'handle_frontend_debug']);
|
||||
add_action('wp_ajax_nopriv_aksrt_frontend_debug', [$this, 'handle_frontend_debug']);
|
||||
add_action('wp_ajax_aksrt_search_history', [$this, 'handle_search_history']);
|
||||
add_action('wp_ajax_aksrt_search_suggestions', [$this, 'handle_search_suggestions']);
|
||||
add_action('wp_ajax_nopriv_aksrt_search_suggestions', [$this, 'handle_search_suggestions']);
|
||||
add_filter('body_class', [$this, 'body_classes']);
|
||||
add_filter('wp_resource_hints', [$this, 'resource_hints'], 10, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字体 CDN 的 preconnect 提示(提前 DNS + TLS 握手,加速首屏字体加载)
|
||||
*/
|
||||
public function resource_hints(array $hints, string $relation): array {
|
||||
if ('preconnect' === $relation) {
|
||||
$hints[] = [
|
||||
'href' => 'https://fonts.googleapis.com',
|
||||
'crossorigin',
|
||||
];
|
||||
$hints[] = [
|
||||
'href' => 'https://fonts.gstatic.com',
|
||||
'crossorigin',
|
||||
];
|
||||
$hints[] = [
|
||||
'href' => 'https://cdn.jsdelivr.net',
|
||||
'crossorigin',
|
||||
];
|
||||
}
|
||||
return $hints;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user