This commit is contained in:
2025-05-13 14:56:18 -07:00
parent 1b6f28cecf
commit ba4f4860ff
8 changed files with 34 additions and 0 deletions

View File

@@ -40,6 +40,8 @@ class Site
private function bootstrap()
{
$this->checkfavicons();
// wordpress added this style for us, but we don't want it
add_action('wp_enqueue_scripts', function () {
wp_dequeue_style('classic-theme-styles');
@@ -1301,4 +1303,17 @@ class Site
Util::processFieldGroup($templateFields);
}
private function checkfavicons()
{
if (!is_dir($manifestFile = get_template_directory() . "/assets")) {
return;
}
if (file_exists(get_template_directory() . "/assets/favicon.ico")) {
add_action('wp_head', function () {
echo "<link rel='icon' type='image/x-icon' href='".get_template_directory_uri()."/assets/favicon.ico'>";
});
}
}
}