add favicon support

This commit is contained in:
2026-02-10 11:43:27 +00:00
parent f2e92651aa
commit f2b229ba5d
3 changed files with 12 additions and 1 deletions

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]);