src/PluginLoader.php
public function preOptionActivePlugins($plugins)
    {
        remove_filter('pre_option_active_plugins', [$this, 'preOptionActivePlugins']);

        if (
            !defined('WP_PLUGIN_DIR') ||
            !defined('WPMU_PLUGIN_DIR') ||
            !is_blog_installed()
        ) {
            return false;
        }

        $this->validatePlugins();

        $haveUnactivatedPlugins = false;
        foreach (array_keys($this->getPlugins()) as $plugin) {
            if ($this->isPluginActive($plugin)) {
                require_once WPMU_PLUGIN_DIR.'/'.$plugin;
            } else {
                $haveUnactivatedPlugins = true;
            }
        }

        if ($haveUnactivatedPlugins) {
            add_action('wp_loaded', [$this, 'activatePlugins']);
        }

        return $plugins;
    }
public function preOptionActivePlugins($plugins)
    {
        remove_filter('pre_option_active_plugins', [$this, 'preOptionActivePlugins']);

        if (
            !defined('WP_PLUGIN_DIR') ||
            !defined('WPMU_PLUGIN_DIR') ||
            !is_blog_installed()
        ) {
            return false;
        }

        $this->validatePlugins();

        $haveUnactivatedPlugins = false;
        foreach (array_keys($this->getPlugins()) as $plugin) {
            if ($this->isPluginActive($plugin)) {
                require_once WPMU_PLUGIN_DIR.'/'.$plugin;
            } else {
                $haveUnactivatedPlugins = true;
            }
        }

        if ($haveUnactivatedPlugins) {
            add_action('wp_loaded', [$this, 'activatePlugins']);
        }

        return $plugins;
    }
public function preOptionActivePlugins ( $ plugins ) { remove_filter ( 'pre_option_active_plugins' , [ $ this , 'preOptionActivePlugins' ] ) ; if ( ! defined ( 'WP_PLUGIN_DIR' ) || ! defined ( 'WPMU_PLUGIN_DIR' ) || ! is_blog_installed ( ) ) { return false ; } $ this -> validatePlugins ( ) ; $ haveUnactivatedPlugins = false ; foreach ( array_keys ( $ this -> getPlugins ( ) ) as $ plugin ) { if ( $ this -> isPluginActive ( $ plugin ) ) { require_once WPMU_PLUGIN_DIR . '/' . $ plugin ; } else { $ haveUnactivatedPlugins = true ; } } if ( $ haveUnactivatedPlugins ) { add_action ( 'wp_loaded' , [ $ this , 'activatePlugins' ] ) ; } return $ plugins ; }
Active plugins including must-use plugins.

@param mixed $plugins

@return mixed
Active plugins including must - use plugins .