diff --git a/plugins/faustwp/.phpcs.xml.dist b/plugins/faustwp/.phpcs.xml.dist index d95fd23d7..fa349cb38 100644 --- a/plugins/faustwp/.phpcs.xml.dist +++ b/plugins/faustwp/.phpcs.xml.dist @@ -24,7 +24,7 @@ - + diff --git a/plugins/faustwp/composer.json b/plugins/faustwp/composer.json index c37a7dc20..ace8b773b 100644 --- a/plugins/faustwp/composer.json +++ b/plugins/faustwp/composer.json @@ -58,6 +58,7 @@ } }, "require": { - "symfony/process": "^6.4.14" + "symfony/process": "^6.4.14", + "php": "^7.4 || ^8.0" } } diff --git a/plugins/faustwp/faustwp.php b/plugins/faustwp/faustwp.php index 1cc18804f..84bc51f26 100644 --- a/plugins/faustwp/faustwp.php +++ b/plugins/faustwp/faustwp.php @@ -10,7 +10,7 @@ * Text Domain: faustwp * Domain Path: /languages * Version: 1.6.0 - * Requires PHP: 7.2 + * Requires PHP: 7.4 * Requires at least: 5.7 * Update URI: false * @@ -29,6 +29,38 @@ define( 'FAUSTWP_PATH', plugin_basename( FAUSTWP_FILE ) ); define( 'FAUSTWP_SLUG', dirname( plugin_basename( FAUSTWP_FILE ) ) ); + +/** + * Get the minimum version of PHP required for this plugin. + * + * @return string Minimum version required. + */ +function faustwp_minimum_php_requirement() { + return '7.4'; +} + +if ( ! is_php_version_compatible( faustwp_minimum_php_requirement() ) ) { + add_action( + 'admin_notices', + function () { + ?> +
+

+ +

+
+