Compare commits

...

2 Commits

Author SHA1 Message Date
ae1444dde8 supporess acf load error 2026-02-10 11:43:44 +00:00
f2b229ba5d add favicon support 2026-02-10 11:43:27 +00:00
4 changed files with 13 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ class Colour
$values = [];
if(function_exists('get_field')):
$colours = get_field('badegg_colours', 'option');
$colours = @get_field('badegg_colours', 'option');
if($colours):
foreach($colours as $index => $props):

View File

@@ -164,9 +164,14 @@ function cors() {
if(WP_ENV == 'development'):
header( 'Access-Control-Allow-Origin: *' );
endif;
}
add_action('wp_head', function(){
if(file_exists(get_theme_file_path('resources/images/favicon/site.webmanifest'))) {
echo \Roots\view("partials.favicon")->render();
}
});
add_action('after_setup_theme', function(){
$image_srcset = new Utilities\ImageSrcset;
$image_srcset->add(['name' => 'hero', 'width' => 1920, 'height' => 1080]);

View File

View File

@@ -0,0 +1,6 @@
<link rel="icon" type="image/png" href="{{ Vite::asset('resources/images/favicon/favicon-96x96.png') }}" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="{{ Vite::asset('resources/images/favicon/favicon.svg') }}" />
<link rel="shortcut icon" href="{{ Vite::asset('resources/images/favicon/favicon.ico') }}" />
<link rel="apple-touch-icon" sizes="180x180" href="{{ Vite::asset('resources/images/favicon/apple-touch-icon.png') }}" />
<meta name="apple-mobile-web-app-title" content="{!! $title !!}" />
<link rel="manifest" href="{{ Vite::asset('resources/images/favicon/site.webmanifest') }}" />