Skip to content

Instantly share code, notes, and snippets.

@Asikur22
Created April 10, 2019 17:26
Show Gist options
  • Save Asikur22/74bedf9a03e4543ab38d0945ac89c84c to your computer and use it in GitHub Desktop.
Save Asikur22/74bedf9a03e4543ab38d0945ac89c84c to your computer and use it in GitHub Desktop.
[Disable Redux Framework Developer Mode “dev_mode”] #ThemeOptions #WordPress
<?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