1
0
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:
Awilum
2022-08-30 21:05:46 +03:00
parent 05969fa064
commit 70543750cb

View File

@@ -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;
});