From 43104d0bb18e239789f34fb977f8ef6789817523 Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 14 Apr 2022 12:41:13 +0300 Subject: [PATCH] feat(shortcodes): update [registry-get] shortcode --- src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php | 4 ++-- .../core/Parsers/Shortcodes/RegistryShortcodeTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php b/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php index 36652f3a..39d7496a 100644 --- a/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php +++ b/src/flextype/core/Parsers/Shortcodes/RegistryShortcode.php @@ -21,8 +21,8 @@ use Thunder\Shortcode\Shortcode\ShortcodeInterface; use function parsers; use function registry; -// Shortcode: [registry_get name="item-name" default="default-value"] -parsers()->shortcodes()->addHandler('registry_get', static function (ShortcodeInterface $s) { +// Shortcode: [registry-get name="item-name" default="default-value"] +parsers()->shortcodes()->addHandler('registry-get', static function (ShortcodeInterface $s) { if (! registry()->get('flextype.settings.parsers.shortcodes.shortcodes.registry.enabled')) { return ''; } diff --git a/tests/src/flextype/core/Parsers/Shortcodes/RegistryShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/RegistryShortcodeTest.php index aaf37881..da9b2fe4 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/RegistryShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/RegistryShortcodeTest.php @@ -2,9 +2,9 @@ declare(strict_types=1); -test('[registry_get] shortcode', function () { +test('[registry-get] shortcode', function () { $this->assertEquals('Flextype', - parsers()->shortcodes()->parse('[registry_get name="flextype.manifest.name"]')); + parsers()->shortcodes()->parse('[registry-get name="flextype.manifest.name"]')); $this->assertEquals('default-value', - parsers()->shortcodes()->parse('[registry_get name="item-name" default="default-value"]')); + parsers()->shortcodes()->parse('[registry-get name="item-name" default="default-value"]')); });