diff --git a/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php b/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php index 8683d712..cc45fc06 100644 --- a/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php +++ b/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php @@ -10,8 +10,8 @@ declare(strict_types=1); use Flextype\Component\Arrays\Arrays; use Thunder\Shortcode\Shortcode\ShortcodeInterface; +// Shortcode: [entries_fetch id="entry-id" field="field-name" default="default-value"] if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.entries.enabled')) { - // Shortcode: [entries_fetch id="entry-id" field="field-name" default="default-value"] flextype('shortcode')->addHandler('entries_fetch', static function (ShortcodeInterface $s) { return Arrays::get(flextype('entries')->fetch($s->getParameter('id')), $s->getParameter('field'), $s->getParameter('default')); }); diff --git a/src/flextype/app/Support/Parsers/Shortcodes/RawShortcode.php b/src/flextype/app/Support/Parsers/Shortcodes/RawShortcode.php index c41c1d48..6b6d6cdc 100644 --- a/src/flextype/app/Support/Parsers/Shortcodes/RawShortcode.php +++ b/src/flextype/app/Support/Parsers/Shortcodes/RawShortcode.php @@ -11,8 +11,8 @@ use Thunder\Shortcode\EventHandler\FilterRawEventHandler; use Thunder\Shortcode\Events; use Thunder\Shortcode\Shortcode\ShortcodeInterface; +// Shortcode: [raw] if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.raw.enabled')) { - // Shortcode: [raw] flextype('shortcode')->addHandler('raw', static function (ShortcodeInterface $s) { return $s->getContent(); }); diff --git a/src/flextype/app/Support/Parsers/Shortcodes/RegistryShortcode.php b/src/flextype/app/Support/Parsers/Shortcodes/RegistryShortcode.php index dc77e53f..f3756472 100644 --- a/src/flextype/app/Support/Parsers/Shortcodes/RegistryShortcode.php +++ b/src/flextype/app/Support/Parsers/Shortcodes/RegistryShortcode.php @@ -9,8 +9,8 @@ declare(strict_types=1); use Thunder\Shortcode\Shortcode\ShortcodeInterface; +// Shortcode: [registry_get name="item-name" default="default-value"] if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.registry.enabled')) { - // Shortcode: [registry_get name="item-name" default="default-value"] flextype('shortcode')->addHandler('registry_get', static function (ShortcodeInterface $s) { return flextype('registry')->get($s->getParameter('name'), $s->getParameter('default')); }); diff --git a/src/flextype/app/Support/Parsers/Shortcodes/UrlShortcode.php b/src/flextype/app/Support/Parsers/Shortcodes/UrlShortcode.php index 00c02320..5a5e2b7e 100644 --- a/src/flextype/app/Support/Parsers/Shortcodes/UrlShortcode.php +++ b/src/flextype/app/Support/Parsers/Shortcodes/UrlShortcode.php @@ -10,8 +10,8 @@ declare(strict_types=1); use Slim\Http\Environment; use Slim\Http\Uri; +// Shortcode: [url] if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.url.enabled')) { - // Shortcode: [url] flextype('shortcode')->addHandler('url', static function () { if (flextype('registry')->has('flextype.settings.url') && flextype('registry')->get('flextype.settings.url') !== '') { return flextype('registry')->get('flextype.settings.url');