Skip to content
Snippets Groups Projects
Select Git revision
  • 57fd835b3662fda6b48acf6eda804de52528f428
  • master default protected
  • fix/woo-stubs-dir
  • default-packages
  • use-internal-packages
  • update-setup
  • feature/wpdesk-cs
  • 2.5.3
  • 2.5.2
  • 2.5.1
  • 2.5.0
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3
  • 2.2.1
  • 2.2
  • 2.1
  • 2.0
  • 1.10.15
  • 1.10.12
  • 1.10.8
  • 1.10.7
  • 1.10.6
  • 1.10.5
  • 1.10.3
  • 1.10.2
27 results

plugin-template.php

Blame
  • Basic_Requirement_Checker.php 20.84 KiB
    <?php
    
    if ( ! interface_exists( 'WPDesk_Requirement_Checker' ) ) {
    	require_once __DIR__ . '/Requirement_Checker.php';
    }
    
    if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
    	/**
    	 * Checks requirements for plugin
    	 * have to be compatible with PHP 5.3.x
    	 */
    	class WPDesk_Basic_Requirement_Checker implements WPDesk_Requirement_Checker {
    
    		const EXTENSION_NAME_OPENSSL = 'openssl';
    
    		const HOOK_ADMIN_NOTICES_ACTION = 'admin_notices';
    
    		const HOOK_PLUGIN_DEACTIVATED_ACTION = 'deactivated_plugin';
    
    		const HOOK_PLUGIN_ACTIVATED_ACTION = 'activated_plugin';
    
    		const PLUGIN_INFO_KEY_NICE_NAME = 'nice_name';
    
    		const PLUGIN_INFO_KEY_NAME = 'name';
    
    		const PLUGIN_INFO_VERSION = 'version';
    
    		const PLUGIN_INFO_FAKE_REQUIRED_MINIMUM_VERSION = '0.0';
    
    		const PLUGIN_INFO_APPEND_PLUGIN_DATA = 'required_version';
    
    		const PLUGIN_INFO_TRANSIENT_NAME = 'wpdesk_requirements_plugins_data';
    
    		const CACHE_TIME = 16;
    
    		const EXPIRATION_TIME = 'expiration_time';
    
    		const PLUGINS = 'plugins';
    
    		/** @var string */
    		protected $plugin_name;
    
    		/** @var string */
    		private $plugin_file;
    
    		/** @var string */
    		private $min_php_version;
    
    		/** @var string */
    		private $min_wp_version;
    
    		/** @var string|null */
    		private $min_wc_version = null;
    
    		/** @var int|null */
    		private $min_openssl_version = null;
    
    		/** @var array */
    		protected $plugin_require;
    
    		/** @var bool */
    		protected $should_check_plugin_versions = false;
    
    		/** @var array */
    		private $module_require;
    
    		/** @var array */
    		private $setting_require;
    
    		/** @var array */