From 70543750cb4771ac04f6b58164258ae79ae2dc23 Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 30 Aug 2022 21:05:46 +0300 Subject: [PATCH] feat(shortcodes): update registry shortcode --- src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php b/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php index a99353cb..d49be99f 100644 --- a/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php +++ b/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php @@ -35,6 +35,7 @@ parsers()->shortcodes()->addHandler('registry', static function (ShortcodeInterf $result = ''; $params = $s->getParameters(); + // get if ( collection(array_keys($params))->filter(static fn ($v) => $v === 'get')->count() > 0 && isset($params['id']) && @@ -47,5 +48,5 @@ parsers()->shortcodes()->addHandler('registry', static function (ShortcodeInterf return is_array($result) ? serializers()->json()->encode($result) : $result; } - return ''; + return $result; });