From 1a9c81282bc3cdd99ad773080ce0621c1ac9b64b Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 3 Mar 2019 21:34:19 +0300 Subject: [PATCH] Flextype Core: Snippets Shortcodes - fixes. --- flextype/shortcodes/SnippetsShortcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flextype/shortcodes/SnippetsShortcode.php b/flextype/shortcodes/SnippetsShortcode.php index 67019175..f71dd002 100644 --- a/flextype/shortcodes/SnippetsShortcode.php +++ b/flextype/shortcodes/SnippetsShortcode.php @@ -17,6 +17,6 @@ use Thunder\Shortcode\Shortcode\ShortcodeInterface; // Snippets // Shortcode: [snippets fetch=snippet-name] -$flextype['shortcodes']->addHandler('snippets', function(ShortcodeInterface $s) { - return Snippets::get($s->getParameter('fetch')); +$flextype['shortcodes']->addHandler('snippets', function(ShortcodeInterface $s) use ($flextype) { + return $flextype['shortcodes']->fetch($s->getParameter('fetch')); });