protected function addActivePluginsFilter()
    {
        // Add mu-plugins to active plugins
        add_filter('option_active_plugins', function ($plugins) {
            if ($this->isPluginsScreen()) {
                return $plugins;
            }

            if (empty($plugins)) {
                return $this->relativeFiles;
            }

            return array_unique(array_merge($plugins, $this->relativeFiles));
        });

        // Prevent active plugins to contain mu-plugins
        add_filter('pre_update_option_active_plugins', function ($plugins) {
            foreach ($plugins as $index => &$plugin) {
                if (strpos($plugin, $this->relativePath) === 0) {
                    unset($plugins[$index]);
                }
            }

            return array_unique(array_values($plugins)); // Fix array indices
        });
    }
protected function addActivePluginsFilter()
    {
        // Add mu-plugins to active plugins
        add_filter('option_active_plugins', function ($plugins) {
            if ($this->isPluginsScreen()) {
                return $plugins;
            }

            if (empty($plugins)) {
                return $this->relativeFiles;
            }

            return array_unique(array_merge($plugins, $this->relativeFiles));
        });

        // Prevent active plugins to contain mu-plugins
        add_filter('pre_update_option_active_plugins', function ($plugins) {
            foreach ($plugins as $index => &$plugin) {
                if (strpos($plugin, $this->relativePath) === 0) {
                    unset($plugins[$index]);
                }
            }

            return array_unique(array_values($plugins)); // Fix array indices
        });
    }
protected function addActivePluginsFilter ( ) { // Add mu-plugins to active plugins add_filter ( 'option_active_plugins' , function ( $ plugins ) { if ( $ this -> isPluginsScreen ( ) ) { return $ plugins ; } if ( empty ( $ plugins ) ) { return $ this -> relativeFiles ; } return array_unique ( array_merge ( $ plugins , $ this -> relativeFiles ) ) ; } ) ; // Prevent active plugins to contain mu-plugins add_filter ( 'pre_update_option_active_plugins' , function ( $ plugins ) { foreach ( $ plugins as $ index => & $ plugin ) { if ( strpos ( $ plugin , $ this -> relativePath ) === 0 ) { unset ( $ plugins [ $ index ] ) ; } } return array_unique ( array_values ( $ plugins ) ) ; // Fix array indices } ) ; }
Add filter for active_plugins site option.

@return void
Add filter for active_plugins site option .