From d5e88a8942f1dc174c6a62e45cec09cec41658cc Mon Sep 17 00:00:00 2001 From: ingeniumed Date: Thu, 12 Sep 2024 14:22:52 +1000 Subject: [PATCH] Add a notice when the min php and wp version is not met --- vip-governance.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vip-governance.php b/vip-governance.php index 6a388f9..42d41de 100644 --- a/vip-governance.php +++ b/vip-governance.php @@ -20,6 +20,19 @@ if ( ! defined( 'VIP_GOVERNANCE_LOADED' ) ) { define( 'VIP_GOVERNANCE_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 () { + ?> +
+

+
+