public function run()
    {
        if (!defined('ABSPATH')) {
            return;
        }

        // Required for 'add_filter' & 'add_action' function.
        require_once ABSPATH.(defined('WPINC') ? WPINC : 'wp-includes').'/plugin.php';

        // Load mu-plugins just before ordinary plugins.
        // wp-settings.php, Line 301: "foreach ( wp_get_active_and_valid_plugins() as $plugin ) {"
        add_filter('pre_option_active_plugins', ($callback = function ($plugins) use (&$callback) {
            remove_filter('pre_option_active_plugins', $callback);

            $this->loadPlugins();

            return $plugins;
        }));

        $this->addActivePluginsFilter();

        // Activate admin filters
        add_action('wp_loaded', function () {
            $this->addAdminFilter();
        });
    }
public function run()
    {
        if (!defined('ABSPATH')) {
            return;
        }

        // Required for 'add_filter' & 'add_action' function.
        require_once ABSPATH.(defined('WPINC') ? WPINC : 'wp-includes').'/plugin.php';

        // Load mu-plugins just before ordinary plugins.
        // wp-settings.php, Line 301: "foreach ( wp_get_active_and_valid_plugins() as $plugin ) {"
        add_filter('pre_option_active_plugins', ($callback = function ($plugins) use (&$callback) {
            remove_filter('pre_option_active_plugins', $callback);

            $this->loadPlugins();

            return $plugins;
        }));

        $this->addActivePluginsFilter();

        // Activate admin filters
        add_action('wp_loaded', function () {
            $this->addAdminFilter();
        });
    }
public function run ( ) { if ( ! defined ( 'ABSPATH' ) ) { return ; } // Required for 'add_filter' & 'add_action' function. require_once ABSPATH . ( defined ( 'WPINC' ) ? WPINC : 'wp-includes' ) . '/plugin.php' ; // Load mu-plugins just before ordinary plugins. // wp-settings.php, Line 301: "foreach ( wp_get_active_and_valid_plugins() as $plugin ) {" add_filter ( 'pre_option_active_plugins' , ( $ callback = function ( $ plugins ) use ( & $ callback ) { remove_filter ( 'pre_option_active_plugins' , $ callback ) ; $ this -> loadPlugins ( ) ; return $ plugins ; } ) ) ; $ this -> addActivePluginsFilter ( ) ; // Activate admin filters add_action ( 'wp_loaded' , function ( ) { $ this -> addAdminFilter ( ) ; } ) ; }
Create a new autolader instance.

@return void
Create a new autolader instance .