forked from pmoreno-rodriguez/grav-theme-editorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditorial.php
More file actions
31 lines (25 loc) · 733 Bytes
/
editorial.php
File metadata and controls
31 lines (25 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace Grav\Theme;
use Grav\Common\Theme;
use RocketTheme\Toolbox\Event\Event;
use Grav\Common\Page\Interfaces\PageInterface;
class Editorial extends Theme
{
// Access plugin events in this class
public static function getSubscribedEvents()
{
return [
'onShortcodeHandlers' => ['onShortcodeHandlers', 0],
'onTwigSiteVariables' => ['onTwigSiteVariables', 0]
];
}
public function onShortcodeHandlers()
{
$this->grav['shortcode']->registerAllShortcodes(__DIR__ . '/shortcodes');
}
public function onTwigSiteVariables()
{
if ($this->isAdmin() && ($this->grav['config']->get('plugins.shortcode-core.enabled'))) {
}
}
}