Revert "Merge tag 'v2.10.6'"
This reverts commit122ea4ab9e
, reversing changes made toc54a11e250
.
This commit is contained in:
@ -11,7 +11,7 @@ class CustomHtmlHeadersInfo extends ExtensionInfo
|
||||
public string $key = self::KEY;
|
||||
public string $name = "Custom HTML Headers";
|
||||
public string $url = "http://www.drudexsoftware.com";
|
||||
public array $authors = ["Drudex Software" => "support@drudexsoftware.com"];
|
||||
public array $authors = ["Drudex Software"=>"support@drudexsoftware.com"];
|
||||
public string $license = self::LICENSE_GPLV2;
|
||||
public string $description = "Allows admins to modify & set custom <head> content";
|
||||
public ?string $documentation =
|
||||
|
@ -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