From 5a297025fa6a1668d64f38cb6e54f3457984216c Mon Sep 17 00:00:00 2001 From: Theo <328805+theodesp@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:48:37 +0000 Subject: [PATCH] refactor: code review update --- plugins/faustwp/faustwp.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/faustwp/faustwp.php b/plugins/faustwp/faustwp.php index e5479d8ef..578bad83b 100644 --- a/plugins/faustwp/faustwp.php +++ b/plugins/faustwp/faustwp.php @@ -44,11 +44,11 @@ function faustwp_minimum_php_requirement() { * * @return bool True if meets minimum requirements, false otherwise. */ -function faustwp_meets_php_requirements() { +function is_php_version_compatible() { return version_compare( phpversion(), faustwp_minimum_php_requirement(), '>=' ); } -if ( ! faustwp_meets_php_requirements() ) { +if ( ! is_php_version_compatible() ) { add_action( 'admin_notices', function () { @@ -59,7 +59,7 @@ function () { printf( /* translators: %s: Minimum required PHP version */ esc_html__( 'FaustWP requires PHP version %s or later. Please upgrade PHP or disable the plugin.', 'faustwp' ), - esc_html( faustwp_meets_php_requirements() ) + esc_html( is_php_version_compatible() ) ); ?>