From a2fedd263ab2ade1855fb2276a6290b22454491c Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Thu, 26 May 2016 19:03:50 +0800 Subject: [PATCH] Fix redux dev_mode configuration --- admin/core/um-admin-redux.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/admin/core/um-admin-redux.php b/admin/core/um-admin-redux.php index be79852c..1e866168 100644 --- a/admin/core/um-admin-redux.php +++ b/admin/core/um-admin-redux.php @@ -15,9 +15,21 @@ } add_action( 'wp_loaded', array( $this, 'initSettings' ), 10 ); + add_action( 'redux/construct', array( $this, 'redux_disable_dev_mode_plugin' ) ); } + + public function redux_disable_dev_mode_plugin( $redux ) { + if ( $redux->args['opt_name'] == 'um_options' ) { + $redux->args['dev_mode'] = false; + $redux->args['dev_mode_forced'] = false; + $redux->args['update_notice'] = false; + } + + } + + public function initSettings() { $this->setArguments();