From 1ddbb10e1ca42e26dec4d62529350df434131940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20=C5=A0mitala?= Date: Tue, 10 Oct 2023 13:28:01 +0200 Subject: [PATCH 1/2] Align PHP minimum version checks --- windows-azure-storage.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/windows-azure-storage.php b/windows-azure-storage.php index 0e065c37..d100b57e 100644 --- a/windows-azure-storage.php +++ b/windows-azure-storage.php @@ -70,7 +70,7 @@ * @return string Minimum version required. */ function was_minimum_php_requirement() { - return '7.4'; + return '8.0'; } /** @@ -214,11 +214,9 @@ function windows_azure_storage_load_textdomain() { */ function windows_azure_plugin_check_prerequisite() { global $wp_version; - $php_version = phpversion(); - $php_compat = version_compare( $php_version, '8.0.0', '>=' ); - if ( ! $php_compat ) { + if ( ! was_minimum_php_requirement() ) { deactivate_plugins( plugin_basename( __FILE__ ) ); - wp_die( __( 'Microsoft Azure Storage for WordPress requires at least PHP 8.0.0', 'windows-azure-storage' ) ); + wp_die( __( 'Microsoft Azure Storage for WordPress requires at least PHP ' . was_minimum_php_requirement(), 'windows-azure-storage' ) ); } $wp_compat = version_compare( $wp_version, '5.7', '>=' ); if ( ! $wp_compat ) { From a56e3c23dd619816e75fcb8424f0baf513114110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20=C5=A0mitala?= Date: Mon, 16 Oct 2023 14:14:36 +0200 Subject: [PATCH 2/2] Update windows-azure-storage.php --- windows-azure-storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-azure-storage.php b/windows-azure-storage.php index d100b57e..a475e0d5 100644 --- a/windows-azure-storage.php +++ b/windows-azure-storage.php @@ -214,7 +214,7 @@ function windows_azure_storage_load_textdomain() { */ function windows_azure_plugin_check_prerequisite() { global $wp_version; - if ( ! was_minimum_php_requirement() ) { + if ( ! was_site_meets_php_requirements() ) { deactivate_plugins( plugin_basename( __FILE__ ) ); wp_die( __( 'Microsoft Azure Storage for WordPress requires at least PHP ' . was_minimum_php_requirement(), 'windows-azure-storage' ) ); }