Revert "Merge tag 'v2.10.6'"
This reverts commit122ea4ab9e
, reversing changes made toc54a11e250
.
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Shimmie2;
|
||||
class CustomHtmlHeaders extends Extension
|
||||
{
|
||||
# Adds setup block for custom <head> content
|
||||
public function onSetupBuilding(SetupBuildingEvent $event): void
|
||||
public function onSetupBuilding(SetupBuildingEvent $event)
|
||||
{
|
||||
$sb = $event->panel->create_new_block("Custom HTML Headers");
|
||||
|
||||
@@ -25,30 +25,30 @@ class CustomHtmlHeaders extends Extension
|
||||
], "<br>Add website name in title");
|
||||
}
|
||||
|
||||
public function onInitExt(InitExtEvent $event): void
|
||||
public function onInitExt(InitExtEvent $event)
|
||||
{
|
||||
global $config;
|
||||
$config->set_default_string("sitename_in_title", "none");
|
||||
}
|
||||
|
||||
# Load Analytics tracking code on page request
|
||||
public function onPageRequest(PageRequestEvent $event): void
|
||||
public function onPageRequest(PageRequestEvent $event)
|
||||
{
|
||||
$this->handle_custom_html_headers();
|
||||
$this->handle_modified_page_title();
|
||||
}
|
||||
|
||||
private function handle_custom_html_headers(): void
|
||||
private function handle_custom_html_headers()
|
||||
{
|
||||
global $config, $page;
|
||||
|
||||
$header = $config->get_string('custom_html_headers', '');
|
||||
if ($header != '') {
|
||||
if ($header!='') {
|
||||
$page->add_html_header($header);
|
||||
}
|
||||
}
|
||||
|
||||
private function handle_modified_page_title(): void
|
||||
private function handle_modified_page_title()
|
||||
{
|
||||
global $config, $page;
|
||||
|
||||
|
Reference in New Issue
Block a user