From 1d95f5999cd880ec81cc0ca90aedaa7f977e2dbd Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 7 Aug 2021 11:46:20 +0300 Subject: [PATCH] feat(fields): update logic for setting `enabled`, affected all fields #564 --- src/flextype/Content/Fields/ContentField.php | 2 +- src/flextype/Content/Fields/CreatedAtField.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flextype/Content/Fields/ContentField.php b/src/flextype/Content/Fields/ContentField.php index 9554cc48..e8f0331b 100644 --- a/src/flextype/Content/Fields/ContentField.php +++ b/src/flextype/Content/Fields/ContentField.php @@ -12,7 +12,7 @@ use Atomastic\Arrays\Arrays; emitter()->addListener('onContentFetchSingleHasResult', static function (): void { - if (! registry()->get('flextype.settings.entries.content.fields.content.fetch.enabled')) { + if (! registry()->get('flextype.settings.entries.content.fields.content.enabled')) { return; } diff --git a/src/flextype/Content/Fields/CreatedAtField.php b/src/flextype/Content/Fields/CreatedAtField.php index 92fd6658..6547c9c4 100644 --- a/src/flextype/Content/Fields/CreatedAtField.php +++ b/src/flextype/Content/Fields/CreatedAtField.php @@ -22,7 +22,7 @@ emitter()->addListener('onContentFetchSingleHasResult', static function (): void emitter()->addListener('onContentCreate', static function (): void { - if (registry()->get('flextype.settings.entries.content.fields.created_at.enabled')) { + if (! registry()->get('flextype.settings.entries.content.fields.created_at.enabled')) { return; }