Getting rid of Redux Framework annoyances

Redux Framework is a nice option framework for WordPress theme and plugin developers, and probably it is one of the most used frameworks out there. However, it comes with a few annoyances that many peoples are complaining of. First one is their dashboard widget. There should be a hook to remove that from my theme. Second, it asks the user to opt-in for tracking usage info. Third, it shows unnecessary admin notices when you’re developing in localhost. These admin notices doesn’t display in production server. But it still annoys me while in development mode because it has no effect on dev_mode value set to true or false. It also adds an extra “Redux Framework” sub menu page under Tools menu which was meant for support options but is not needed when you’re a theme developer and providing support by yourself.

Screen Shot 2015-04-24 at 9.59.11 PM

So here is how you can get rid of these things. Remember, there are no hooks to turn them off easily and you need to modify core files. Fortunately the changes are simple. Let’s do it!

1. Turn off Dashboard Widget and Stop admin notices

Open ReduxCore/framework.php and you will find the following code block around line # 405 (depending on your version of Redux Framework)

[sourcecode language=”php”]
if ( $this->args[‘dev_mode’] == true || Redux_Helpers::isLocalHost() == true ) {
include_once ‘core/dashboard.php’;

if ( ! isset ( $GLOBALS[‘redux_notice_check’] ) ) {
include_once ‘core/newsflash.php’;

$params = array(
‘dir_name’ => ‘notice’,
‘server_file’ => ‘http://www.reduxframework.com/’ . ‘wp-content/uploads/redux/redux_notice.json’,
‘interval’ => 3,
‘cookie_id’ => ‘redux_blast’,
);

new reduxNewsflash( $this, $params );
$GLOBALS[‘redux_notice_check’] = 1;
}
}
[/sourcecode]

Comment out the whole block and you’re done!

2. Turn off opt-in Tracking popup

This one is quite easy. Just add the disable_tracking in your option setting arguments (where you define your opt_name value) and you’re done

[sourcecode language=”php”]
$args = array(
// TYPICAL -> Change these values as you need/desire
‘opt_name’ => $opt_name,
‘disable_tracking’ => true,

[/sourcecode]

3. Remove “Redux Framework” sub menu under Tools

To remove that menu, add the following code-block in your functions.php. Remember to set the priority higher than 10 🙂

[sourcecode language=”php”]
/** remove redux menu under the tools **/
add_action( ‘admin_menu’, ‘remove_redux_menu’,12 );
function remove_redux_menu() {
remove_submenu_page(‘tools.php’,’redux-about’);
}
[/sourcecode]

Hope you liked this article. Enjoy!