scorify the site_description extension
This commit is contained in:
parent
8dfb7e5ed3
commit
85c8875ffe
@ -9,12 +9,12 @@
|
|||||||
class SiteDescription implements Extension {
|
class SiteDescription implements Extension {
|
||||||
public function receive_event(Event $event) {
|
public function receive_event(Event $event) {
|
||||||
if($event instanceof PageRequestEvent) {
|
if($event instanceof PageRequestEvent) {
|
||||||
global $config;
|
if(strlen($event->context->config->get_string("site_description")) > 0) {
|
||||||
if(strlen($config->get_string("site_description")) > 0) {
|
$description = $event->context->config->get_string("site_description");
|
||||||
$description = $config->get_string("site_description");
|
$event->context->page->add_header("<meta name=\"description\" content=\"$description\">");
|
||||||
$event->page->add_header("<meta name=\"description\" content=\"$description\">");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($event instanceof SetupBuildingEvent) {
|
if($event instanceof SetupBuildingEvent) {
|
||||||
$sb = new SetupBlock("Site Description");
|
$sb = new SetupBlock("Site Description");
|
||||||
$sb->add_longtext_option("site_description");
|
$sb->add_longtext_option("site_description");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user