Skip to content

Commit

Permalink
Added favicon to core
Browse files Browse the repository at this point in the history
  • Loading branch information
puleeno committed Sep 23, 2023
1 parent c5100c2 commit f955c12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use App\Common\Option;
use App\Constracts\AssetTypeEnum;
use App\Core\AssetManager;
use App\Core\Assets\AssetOptions;
use App\Core\Assets\AssetStylesheetOptions;
use App\Core\Assets\AssetUrl;
use Psr\Http\Message\ResponseInterface as Response;
Expand Down Expand Up @@ -205,6 +204,10 @@ protected function setupAssets()
HookManager::addAction('head', function () use ($version) {
echo sprintf('<meta name="generator" content="Puleeno CMS %s" />', $version) . PHP_EOL;
}, 0);
HookManager::addAction('head', function () {
$faviconUrl = HookManager::applyFilters('favicon_url', '/assets/favicon.ico');
echo sprintf(str_repeat("\t", 2) . '<link rel="icon" type="image/x-icon" href="%s">', $faviconUrl) . PHP_EOL;
});

// Setup assets in <head> tag
HookManager::addAction('head', [$assetManager, 'printInitHeadScripts'], 33);
Expand Down
Binary file added public/assets/favicon.ico
Binary file not shown.

0 comments on commit f955c12

Please sign in to comment.