mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 13:16:45 +02:00
feat(shortcodes): update registry shortcode
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
Reference in New Issue
Block a user