mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 05:36:54 +02:00
feat(shortcodes): add ability to init custom shortcodes
This commit is contained in:
@@ -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) ||
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user