From 7d4acecaf4acfe3583302385774737249011bd40 Mon Sep 17 00:00:00 2001 From: Max Fenton Date: Thu, 26 Oct 2023 13:30:13 -0400 Subject: [PATCH] [#69] Add `disableEditButton` option to module config --- src/Module.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Module.php b/src/Module.php index 1a627af..0178f1b 100644 --- a/src/Module.php +++ b/src/Module.php @@ -129,6 +129,12 @@ function (Event $e) { View::class, View::EVENT_END_BODY, static function (Event $e) { + if ( + self::$config['disableEditButton'] + ) { + return; + } + if ( Craft::$app->config->general->devMode || Craft::$app->user->checkPermission('accessCp') @@ -219,6 +225,7 @@ private function _loadConfig() 'tailwind' => [ 'configPath' => Craft::getAlias('@config/tailwind/tailwind.json'), ], + 'disableEditButton' => false, ]; $userSettings = Craft::$app->config->getConfigFromFile('viget');