1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-06 13:16:45 +02:00

refactor(shortcodes): simplefy logic for const shortcode

This commit is contained in:
Awilum
2022-05-31 11:20:50 +03:00
parent 89325800e9
commit 144b197419

View File

@@ -28,12 +28,7 @@ parsers()->shortcodes()->addHandler('const', static function (ShortcodeInterface
if ($s->getBBCode() !== null) {
$const = parsers()->shortcodes()->parse($s->getBBCode());
if (defined($const)) {
return constant($const);
} else {
return '';
}
return defined($const) ? constant($const) : '';
}
return '';