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

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
assets/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
assets/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
assets/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

19
assets/site.webmanifest Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/wp-content/themes/chatte-theme/assets/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/wp-content/themes/chatte-theme/assets//android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

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'>";
});
}
}
}