diff --git a/src/flextype/core/Parsers/Shortcodes.php b/src/flextype/core/Parsers/Shortcodes.php index 115c0cd6..37ed3e2e 100644 --- a/src/flextype/core/Parsers/Shortcodes.php +++ b/src/flextype/core/Parsers/Shortcodes.php @@ -84,11 +84,13 @@ final class Shortcodes /** * Init Shortcodes + * + * @param array $shortcodes Shortcoes to init. + * + * @return void */ - public function initShortcodes(): void + public function initShortcodes(array $shortcodes): void { - $shortcodes = registry()->get('flextype.settings.parsers.shortcodes.shortcodes'); - if ( ! isset($shortcodes) || ! is_array($shortcodes) || diff --git a/src/flextype/flextype.php b/src/flextype/flextype.php index 01ddcbb6..fa2e6bc3 100644 --- a/src/flextype/flextype.php +++ b/src/flextype/flextype.php @@ -338,7 +338,7 @@ container()->set('cache', static function () { container()->set('parsers', new Parsers()); // Init Shortcodes -parsers()->shortcodes()->initShortcodes(); +parsers()->shortcodes()->initShortcodes(registry()->get('flextype.settings.parsers.shortcodes.shortcodes')); // Add Serializers Service container()->set('serializers', new Serializers());