Skip to content

Commit 751e052

Browse files
authored
Added disable_demo to the API
1 parent 76c0f81 commit 751e052

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ReduxCore/inc/class.redux_api.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,21 @@ public static function setExtensions( $opt_name, $path ) {
571571
}
572572
}
573573
}
574+
575+
/**
576+
* Method to disables Redux demo mode popup.
577+
*/
578+
public static function disable_demo() {
579+
add_action('ReduxFrameworkPlugin_admin_notice', 'Redux::remove_demo', 0);
580+
add_action('redux_framework_plugin_admin_notice', 'Redux::remove_demo', 0);
581+
}
582+
583+
/**
584+
* Callback used by Redux::disable_demo() to remove the demo mode notice from Redux.
585+
*/
586+
function remove_demo() {
587+
update_option('ReduxFrameworkPlugin_ACTIVATED_NOTICES', '');
588+
}
574589

575590
public static function getAllExtensions() {
576591
$redux = ReduxFrameworkInstances::get_all_instances();

0 commit comments

Comments
 (0)