From 126068dc295b42e68095715ecdda39fc78142a69 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 16 Jul 2021 21:31:05 +0300 Subject: [PATCH] feat(entries): update settings #552 --- .../Support/Parsers/Shortcodes/EntriesShortcode.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flextype/Support/Parsers/Shortcodes/EntriesShortcode.php b/src/flextype/Support/Parsers/Shortcodes/EntriesShortcode.php index 0eff9527..46cb168e 100644 --- a/src/flextype/Support/Parsers/Shortcodes/EntriesShortcode.php +++ b/src/flextype/Support/Parsers/Shortcodes/EntriesShortcode.php @@ -11,9 +11,9 @@ namespace Flextype\Support\Parsers\Shortcodes; use Thunder\Shortcode\Shortcode\ShortcodeInterface; -// Shortcode: [entries_fetch id="entry-id" field="field-name" default="default-value"] -if (flextype('registry')->get('flextype.settings.parsers.shortcode.shortcodes.entries.enabled')) { - flextype('parsers')->shortcode()->addHandler('entries_fetch', static function (ShortcodeInterface $s) { - return arrays(flextype('entries')->fetch($s->getParameter('id')))->get($s->getParameter('field'), $s->getParameter('default')); +// Shortcode: [content_fetch id="entry-id" field="field-name" default="default-value"] +if (flextype('registry')->get('flextype.settings.parsers.shortcode.shortcodes.content.enabled')) { + flextype('parsers')->shortcode()->addHandler('content_fetch', static function (ShortcodeInterface $s) { + return arrays(flextype('content')->fetch($s->getParameter('id')))->get($s->getParameter('field'), $s->getParameter('default')); }); }