'Shortcode', 'description' => 'Shortcode integration for OctoberCMS.', 'author' => 'Sensory 5', 'icon' => 'icon-code' ]; } /** * Register service provider, Twig extensions, and alias facade. */ public function boot() { // Service provider App::register('\Sensory5\Shortcode\Classes\ServiceProvider'); // Register alias $alias = AliasLoader::getInstance(); $alias->alias('Shortcode', '\Sensory5\Shortcode\Classes\Facade'); // Enable shortcodes on all pages if requested if (Settings::get('enable_on_render', false)) { Event::listen('cms.page.render', function($controller, $content) { return \Shortcode::parse($content); }); } } /** * Register twig filters */ public function registerMarkupTags() { return [ 'filters' => [ 'shortcode' => ['\Shortcode', 'parse'] ], 'functions' => ['shortcode' => ['\Shortcode', 'parse'] ] ]; } /** * Register backend settings */ public function registerSettings() { return [ 'settings' => [ 'label' => 'Shortcode Settings', 'description' => 'Manage shortcode settings', 'category' => 'Shortcodes', 'icon' => 'icon-code', 'class' => 'Sensory5\Shortcode\Models\Settings', 'order' => 600, 'keywords' => 'shortcode shortcodes' ] ]; } }