diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 136012dd07..465383b81e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -8833,13 +8833,21 @@ function wp_get_wp_version() { * * @since 5.2.0 * - * @global string $wp_version The WordPress version string. + * @global string $_wp_tests_wp_version The WordPress version string. Used only in Core tests. * * @param string $required Minimum required WordPress version. * @return bool True if required version is compatible or empty, false if not. */ function is_wp_version_compatible( $required ) { - global $wp_version; + if ( + defined( 'WP_RUN_CORE_TESTS' ) + && WP_RUN_CORE_TESTS + && isset( $GLOBALS['_wp_tests_wp_version'] ) + ) { + $wp_version = $GLOBALS['_wp_tests_wp_version']; + } else { + $wp_version = wp_get_wp_version(); + } // Strip off any -alpha, -RC, -beta, -src suffixes. list( $version ) = explode( '-', $wp_version ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a286efd36a..0cc490f4b3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58842'; +$wp_version = '6.7-alpha-58843'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.