Skip to content

Commit

Permalink
Change tag name and move title to site:title
Browse files Browse the repository at this point in the history
  • Loading branch information
puleeno committed Sep 15, 2023
1 parent 83db0a7 commit aacc47b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/Http/Middleware/AssetsMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public function getPriority(): int
return 9999;
}

protected function getSiteTitle() {
return HookManager::applyFilters(
'title',
get_option('site_name', 'Puleeno CMS')
);
}

protected function getHeadAssets()
{
ob_start();
Expand Down Expand Up @@ -45,10 +52,12 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
$template = (string) $response->getBody();

$template = str_replace([
'<!--site:title-->',
'<!--asset:head-->',
'<!--asset:start_body-->',
'<!--html:start_body-->',
'<!--asset:footer-->'
], [
$this->getSiteTitle(),
$this->getHeadAssets(),
$this->getOpenBodyTags(),
$this->getFooterAssets()
Expand Down

0 comments on commit aacc47b

Please sign in to comment.