PluginProbe
Polylang / trunk
Polylang vtrunk
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | src/install/usable.php +16 -22 3.8.9 → trunk View file →
@@ -47,20 +47,17 @@
47 47 *
48 48 * @return void
49 49 */
50 50 public static function php_version_notice() {
51 - load_plugin_textdomain( 'polylang' ); // Plugin i18n.
51 + $message = sprintf(
52 + /* translators: 1: Plugin name 2: Current PHP version 3: Required PHP version */
53 + 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' ),
54 + esc_html( static::get_plugin_name() ),
55 + esc_html( pll_get_constant( 'PHP_VERSION', '' ) ),
56 + esc_html( static::get_min_php_version() )
57 + );
52 58
53 - printf(
54 - '<div class="error"><p>%s</p></div>',
55 - sprintf(
56 - /* translators: 1: Plugin name 2: Current PHP version 3: Required PHP version */
57 - 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' ),
58 - esc_html( static::get_plugin_name() ),
59 - esc_html( pll_get_constant( 'PHP_VERSION', '' ) ),
60 - esc_html( static::get_min_php_version() )
61 - )
62 - );
59 + wp_admin_notice( $message, array( 'type' => 'error' ) );
63 60 }
64 61
65 62 /**
66 63 * Displays a notice if WP min version is not met.
@@ -73,20 +70,17 @@
73 70 */
74 71 public static function wp_version_notice() {
75 72 global $wp_version;
76 73
77 - load_plugin_textdomain( 'polylang' ); // Plugin i18n.
74 + $message = sprintf(
75 + /* translators: 1: Plugin name 2: Current WordPress version 3: Required WordPress version */
76 + 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' ),
77 + esc_html( static::get_plugin_name() ),
78 + esc_html( $wp_version ),
79 + esc_html( static::get_min_wp_version() )
80 + );
78 81
79 - printf(
80 - '<div class="error"><p>%s</p></div>',
81 - sprintf(
82 - /* translators: 1: Plugin name 2: Current WordPress version 3: Required WordPress version */
83 - 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' ),
84 - esc_html( static::get_plugin_name() ),
85 - esc_html( $wp_version ),
86 - esc_html( static::get_min_wp_version() )
87 - )
88 - );
82 + wp_admin_notice( $message, array( 'type' => 'error' ) );
89 83 }
90 84
91 85 /**
92 86 * Returns the minimal php version required to run the plugin.