From 11a25a34955109faaa638caadc5a519115ce24ac Mon Sep 17 00:00:00 2001 From: ingeniumed Date: Thu, 12 Sep 2024 14:24:48 +1000 Subject: [PATCH 1/2] Add min php and wp notice --- vip-block-data-api.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vip-block-data-api.php b/vip-block-data-api.php index 5874815..7f3d640 100644 --- a/vip-block-data-api.php +++ b/vip-block-data-api.php @@ -20,6 +20,19 @@ if ( ! defined( 'VIP_BLOCK_DATA_API_LOADED' ) ) { define( 'VIP_BLOCK_DATA_API_LOADED', true ); + // ToDo: When 6.4 is our min version, switch to wp_admin_notice. + global $wp_version; + if ( version_compare( phpversion(), '8.0', '<' ) || version_compare( $wp_version, '6.0', '<' ) ) { + add_action( 'admin_notices', function () { + ?> +
+

+
+ Date: Thu, 12 Sep 2024 14:32:46 +1000 Subject: [PATCH 2/2] Up the version --- vip-block-data-api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vip-block-data-api.php b/vip-block-data-api.php index 7f3d640..942f2ed 100644 --- a/vip-block-data-api.php +++ b/vip-block-data-api.php @@ -5,7 +5,7 @@ * Description: Access Gutenberg block data in JSON via the REST API. * Author: WordPress VIP * Text Domain: vip-block-data-api - * Version: 1.4.1 + * Version: 1.4.2 * Requires at least: 6.0 * Tested up to: 6.6 * Requires PHP: 8.0 @@ -33,7 +33,7 @@ return; } - define( 'WPCOMVIP__BLOCK_DATA_API__PLUGIN_VERSION', '1.4.1' ); + define( 'WPCOMVIP__BLOCK_DATA_API__PLUGIN_VERSION', '1.4.2' ); define( 'WPCOMVIP__BLOCK_DATA_API__REST_ROUTE', 'vip-block-data-api/v1' ); // Analytics related configs.