Skip to content

Commit

Permalink
Merge pull request #27 from getherbie/feature/yml-shortcodes
Browse files Browse the repository at this point in the history
Feature/yml shortcodes
  • Loading branch information
tbreuss committed Mar 1, 2016
2 parents f82b758 + 127c028 commit 8486585
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/shortcode/shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ public function __construct()
{
$this->config = DI::get('Config');
$tags = $this->config->get('plugins.config.shortcode', []);

// Feature 20160224: Define simple shortcodes also in config.yml
foreach($tags as $tag => $_callable){
$tags[$tag] = create_function('$atts, $content', $_callable.';');
}

$this->shortcode = new Shortcode($tags);
DI::set('Shortcode', $this->shortcode);
}
Expand Down

0 comments on commit 8486585

Please sign in to comment.