mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 22:26:46 +02:00
chore(parsers): typo update
This commit is contained in:
@@ -10,8 +10,8 @@ declare(strict_types=1);
|
||||
use Flextype\Component\Arrays\Arrays;
|
||||
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
|
||||
|
||||
// Shortcode: [entries_fetch id="entry-id" field="field-name" default="default-value"]
|
||||
if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.entries.enabled')) {
|
||||
// Shortcode: [entries_fetch id="entry-id" field="field-name" default="default-value"]
|
||||
flextype('shortcode')->addHandler('entries_fetch', static function (ShortcodeInterface $s) {
|
||||
return Arrays::get(flextype('entries')->fetch($s->getParameter('id')), $s->getParameter('field'), $s->getParameter('default'));
|
||||
});
|
||||
|
@@ -11,8 +11,8 @@ use Thunder\Shortcode\EventHandler\FilterRawEventHandler;
|
||||
use Thunder\Shortcode\Events;
|
||||
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
|
||||
|
||||
// Shortcode: [raw]
|
||||
if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.raw.enabled')) {
|
||||
// Shortcode: [raw]
|
||||
flextype('shortcode')->addHandler('raw', static function (ShortcodeInterface $s) {
|
||||
return $s->getContent();
|
||||
});
|
||||
|
@@ -9,8 +9,8 @@ declare(strict_types=1);
|
||||
|
||||
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
|
||||
|
||||
// Shortcode: [registry_get name="item-name" default="default-value"]
|
||||
if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.registry.enabled')) {
|
||||
// Shortcode: [registry_get name="item-name" default="default-value"]
|
||||
flextype('shortcode')->addHandler('registry_get', static function (ShortcodeInterface $s) {
|
||||
return flextype('registry')->get($s->getParameter('name'), $s->getParameter('default'));
|
||||
});
|
||||
|
@@ -10,8 +10,8 @@ declare(strict_types=1);
|
||||
use Slim\Http\Environment;
|
||||
use Slim\Http\Uri;
|
||||
|
||||
// Shortcode: [url]
|
||||
if (flextype('registry')->get('flextype.settings.shortcode.shortcodes.url.enabled')) {
|
||||
// Shortcode: [url]
|
||||
flextype('shortcode')->addHandler('url', static function () {
|
||||
if (flextype('registry')->has('flextype.settings.url') && flextype('registry')->get('flextype.settings.url') !== '') {
|
||||
return flextype('registry')->get('flextype.settings.url');
|
||||
|
Reference in New Issue
Block a user