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