Skip to content

Commit

Permalink
refactor: code review update
Browse files Browse the repository at this point in the history
  • Loading branch information
theodesp committed Jan 23, 2025
1 parent 9e7d69a commit 5a29702
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/faustwp/faustwp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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() )
);
?>
</p>
Expand Down

0 comments on commit 5a29702

Please sign in to comment.