Created
April 10, 2019 17:26
-
-
Save Asikur22/74bedf9a03e4543ab38d0945ac89c84c to your computer and use it in GitHub Desktop.
[Disable Redux Framework Developer Mode “dev_mode”] #ThemeOptions #WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Disable Redux Developer Mode dev_mode | |
*/ | |
function redux_disable_dev_mode_plugin( $redux ) { | |
if ( ! function_exists( 'redux_disable_dev_mode_plugin' ) ) { | |
if ( $redux->args['opt_name'] != 'redux_demo' ) { | |
$redux->args['dev_mode'] = false; | |
$redux->args['forced_dev_mode_off'] = false; | |
} | |
} | |
} | |
add_action( 'redux/construct', 'redux_disable_dev_mode_plugin' ); | |
function gl_removeDemoModeLink() { | |
if ( class_exists( 'ReduxFrameworkPlugin' ) ) { | |
remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks' ), null, 2 ); | |
} | |
if ( class_exists( 'ReduxFrameworkPlugin' ) ) { | |
remove_action( 'admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) ); | |
} | |
} | |
add_action( 'init', 'gl_removeDemoModeLink' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment