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:
@@ -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 '';
|
||||
|
Reference in New Issue
Block a user