diff --git a/functions.php b/functions.php index b8377e2..093ad6c 100644 --- a/functions.php +++ b/functions.php @@ -10,7 +10,12 @@ * @link https://www.christophherr.com/ */ -function get_genesis_version() { +/** + * Get the version of the Genesis framework. + * + * @return string + */ +function prometheus_2_get_genesis_version() { return wp_get_theme( 'genesis' )->get( 'Version' ); } diff --git a/lib/minimum-requirements.php b/lib/minimum-requirements.php index 36782d5..f9bd6b4 100644 --- a/lib/minimum-requirements.php +++ b/lib/minimum-requirements.php @@ -68,9 +68,9 @@ function prometheus_2_show_deactivation_and_upgrade_notice() { * @return string */ function prometheus_2_upgrade_message() { - $genesis_version = get_genesis_version(); - $compare_wp_version = version_compare( $GLOBALS['wp_version'], '4.8', '<' ); - $compare_php_version = version_compare( PHP_VERSION, '5.6', '<' ); + $genesis_version = prometheus_2_get_genesis_version(); + $compare_wp_version = version_compare( $GLOBALS['wp_version'], '4.8', '<' ); + $compare_php_version = version_compare( PHP_VERSION, '5.6', '<' ); $compare_genesis_version = version_compare( $genesis_version, '2.6', '<' ); if ( $compare_wp_version && $compare_php_version && $compare_genesis_version ) {