1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 21:56:33 +02:00

feat(shortcodes): fix logic for uuid shortcode and upd tests

This commit is contained in:
Awilum
2022-05-25 18:16:19 +03:00
parent 39ff8ef7bc
commit 852260c68e

View File

@@ -18,13 +18,12 @@ namespace Flextype\Parsers\Shortcodes;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
use Ramsey\Uuid\Uuid;
use function app;
use function parsers;
use function registry;
// Shortcode: uuid
// Usage: (uuid) (uuid:4)
parsers()->shortcodes()->addHandler('uuid', static function () {
parsers()->shortcodes()->addHandler('uuid', static function (ShortcodeInterface $s) {
if (! registry()->get('flextype.settings.parsers.shortcodes.shortcodes.uuid.enabled')) {
return '';
}