Can't disable developer mode after setting dev_mode = False
I am not using redux as a plugin, i have embedded it into my theme.I can't disable dev mode even though i set dev_mode = false.I am using version 3.3.6.9.
It's dev_mode => false;
Also, please upgrade to the latest version.
I have done the same but the notification that says "Developer Mode Enabled" and ad in header it still there.
Please help you have closed the thread without solving the problem :/
I cannot reproduce. Where are adjusting this setting? And did you upgrade?
I am setting dev_mode => false; in framework.php.I can't upgrade because i am working on it already.If i do then i have to make alot of changes.BTW the version i am using is close to the current version and it has no changes in changelog regarding developer mode so i guess it doesn't matter.
That's your problem. You need to make that adjustment in your config file.
Opps sorry that was config.php i changed it for development purposes.And i figured out something else :)
You should never make changes to the framework.php. They will all be lost on updating. That's why arguments should be set in the config. Those in framework are defaults, overidden by those set in config.
I guess you need to change this code
if ( isset( $this->args['dev_mode'] ) && $this->args['dev_mode'] ) {
echo '' . __( 'Developer Mode Enabled', 'redux-framework' ) . '';
}
to This
if ( isset( $this->args['dev_mode'] ) && $this->args['dev_mode'] == true ) {
echo '' . __( 'Developer Mode Enabled', 'redux-framework' ) . '';
}
So that if someone sets dev_mode => true; to dev_mode => false; that thing goes away.
You know better then me because you are pro but i am just giving my opinion.
$this->args['dev_mode'] and $this->args['dev_mode'] == true are the same thing. They both evaluate to true. Changing it would make no difference. As I said, I cannot reproduce, but my config is correct and I'm not tampering with framework,php to adjust settings.
Ops then i think i have to step back a little and charge my php skills.Thank you very much for your time, i appreciate it alot :+1: :)
Just wanted to comment in case someone else trips over the problem of not getting out of dev_mode.
'dev_mode' => 'false', // will not work 'dev_mode' => false, // works
You're right. It's a Boolean variable. ;)
With a fresh install I am getting this notice. I'm unsure as to why. In my config.php file I have:
'dev_mode' => false,
The disabler plugin works but I really would like to not use a plugin to solve this problem.
#2238, @invot
Hi, i thank that because your have the define('WP_DEBUG', true) in wp-config.php (line 66), just set it to 'false' and it will work. @+
Yes I just want to confirm the @abeneo 's comment. If you have included Redux in your theme and then included the simple-config.php and you have 'dev_mode' => false , then set your WP_DEBUG to false in wp-config.php and the Developer Mode goes away! Thank you!
Thanks for your feedback! On 29 Jan 2016 14:44, "asabanovic" [email protected] wrote:
Yes I just want to confirm the @abeneo https://github.com/abeneo 's comment. If you have included Redux in your theme and then included the simple-config.php and you have 'dev_mode' => false , then set your WP_DEBUG to false in wp-config.php. Thank you!
— Reply to this email directly or view it on GitHub https://github.com/reduxframework/redux-framework/issues/1654#issuecomment-176760860 .
i'm not sure of the reason, but if dev_mode flag is set to false, dev_mode tips and messages should be ignored, right now (v.3.9.4) checks for dev_mode are of this type:
if ( $this->args['dev_mode'] == true || Redux_Helpers::isLocalHost() == true )
or even if ( Redux_Helpers::isWpDebug() )
which re-enables dev_mode (even if explicitly set to false ) if localhost environment is used. imo this should be removed. If a developer needs to test without dev_mode on even in localhost environment it should be doable
This is the way we prefer it. Those in local or debug mode who ask for help never seemed to have dev_mode on. Plus, it circumvented our ad network, which is why Redux makes any type of money.