WIP
This commit is contained in:
BIN
assets/android-chrome-192x192.png
Normal file
BIN
assets/android-chrome-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
assets/android-chrome-512x512.png
Normal file
BIN
assets/android-chrome-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
assets/apple-touch-icon.png
Normal file
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
BIN
assets/favicon-16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 738 B |
BIN
assets/favicon-32x32.png
Normal file
BIN
assets/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/favicon.ico
Normal file
BIN
assets/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
19
assets/site.webmanifest
Normal file
19
assets/site.webmanifest
Normal 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"
|
||||
}
|
||||
@@ -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'>";
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user