403Webshell
Server IP : 216.106.184.20  /  Your IP : 216.73.216.234
Web Server : LiteSpeed
System : Linux asmodeus.in-hell.com 5.14.0-570.58.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 29 06:24:11 EDT 2025 x86_64
User : sekoaid1 ( 1891)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/sekoaid1/www/wp-content/plugins/pop-up-pop-up/analyst/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/sekoaid1/www/wp-content/plugins/pop-up-pop-up/analyst/sdk_resolver.php
<?php

if (!function_exists('analyst_resolve_sdk')) {

	/**
	 * Resolve supported sdk versions and load latest supported one
	 * also bootstrap sdk with autoloader
	 *
	 * @since 1.1.3
	 *
	 * @param null $thisPluginPath
	 * @return void
	 * @throws Exception
	 */
    function analyst_resolve_sdk($thisPluginPath = null) {
    	static $loaded = false;

    	// Exit if we already resolved SDK
    	if ($loaded) return;

        $plugins = get_option('active_plugins');

    		if ($thisPluginPath) {
    			array_push($plugins, plugin_basename($thisPluginPath));
    		}

        $pluginsFolder = WP_PLUGIN_DIR;

        $possibleSDKs = array_map(function ($path) use ($pluginsFolder) {
            $sdkFolder = sprintf('%s/%s/analyst/', $pluginsFolder, dirname($path));

            $sdkFolder = str_replace('\\', '/', $sdkFolder);

            $versionPath = $sdkFolder . 'version.php';

            if (file_exists($versionPath)) {
                return require $versionPath;
            }

            return false;
        }, $plugins);

        global $wp_version;

        // Filter out plugins which has no SDK
        $SDKs = array_filter($possibleSDKs, function ($s) {return is_array($s);});

        // Filter SDKs which is supported by PHP and WP
        $supported = array_values(array_filter($SDKs, function ($sdk) use($wp_version) {
           $phpSupported = version_compare(PHP_VERSION, $sdk['php']) >= 0;
           $wpSupported = version_compare($wp_version, $sdk['wp']) >= 0;

           return $phpSupported && $wpSupported;
        }));

        // Sort SDK by version in descending order
        uasort($supported, function ($x, $y) {
           return version_compare($y['sdk'], $x['sdk']);
        });

	    // Reset sorted values keys
	    $supported = array_values($supported);

        if (!isset($supported[0])) {
            throw new Exception('There is no SDK which is support current PHP version and WP version');
        }

        // Autoload files for supported SDK
        $autoloaderPath = str_replace(
            '\\',
            '/',
            sprintf('%s/autoload.php', $supported[0]['path'])
        );

        require_once $autoloaderPath;

        $loaded = true;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit