Skip to content

Commit 384eb10

Browse files
committed
Fix PHP version check
In version 3.1.0 the PHP requirement dropped from 7.1 to 7.0. I've updated the version compare to reflect that change so that the plugin does not attempt to deactivate on PHP 7.0. Fixes #5
1 parent 84cab98 commit 384eb10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

genesis-js-no-js.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
die;
3838
}
3939

40-
if ( version_compare( PHP_VERSION, '7.1', '<' ) ) {
40+
if ( version_compare( PHP_VERSION, '7.0', '<' ) ) {
4141
if ( current_user_can( 'activate_plugins' ) ) {
4242
add_action( 'admin_init', 'genesis_js_no_js_deactivate' );
4343
add_action( 'admin_notices', 'genesis_js_no_js_deactivation_notice' );
@@ -56,7 +56,7 @@ function genesis_js_no_js_deactivation_notice() {
5656
$notice = sprintf(
5757
// Translators: 1: Required PHP version, 2: Current PHP version.
5858
'<strong>Plugin name</strong> requires PHP %1$s to run. This site uses %2$s, so the plugin has been <strong>deactivated</strong>.',
59-
'7.1',
59+
'7.0',
6060
PHP_VERSION
6161
);
6262
?>

0 commit comments

Comments
 (0)