HM\BackUpWordPress\Plugin::load_first PHP Method

load_first() public method

Ensure BackUpWordPress is loaded before add-ons, changes the order of the serialized values in the DB field.
public load_first ( )
    public function load_first()
    {
        $active_plugins = get_option('active_plugins');
        $plugin_path = plugin_basename(__FILE__);
        $key = array_search($plugin_path, $active_plugins);
        if ($key > 0) {
            array_splice($active_plugins, $key, 1);
            array_unshift($active_plugins, $plugin_path);
            update_option('active_plugins', $active_plugins);
        }
    }