General: Move `wp_get_wp_version()` to a more appropriate place.
This places the function in a more predictable location, next to the `is_wp_version_compatible()` and `is_php_version_compatible()` functions. Follow-up to [58813]. See #61627. Built from https://develop.svn.wordpress.org/trunk@58826 git-svn-id: http://core.svn.wordpress.org/trunk@58222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
77f5a025b2
commit
eb33b8b4f7
|
@ -8807,6 +8807,23 @@ function clean_dirsize_cache( $path ) {
|
||||||
set_transient( 'dirsize_cache', $directory_cache, $expiration );
|
set_transient( 'dirsize_cache', $directory_cache, $expiration );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current WordPress version.
|
||||||
|
*
|
||||||
|
* Returns an unmodified value of `$wp_version`. Some plugins modify the global
|
||||||
|
* in an attempt to improve security through obscurity. This practice can cause
|
||||||
|
* errors in WordPress, so the ability to get an unmodified version is needed.
|
||||||
|
*
|
||||||
|
* @since 6.7.0
|
||||||
|
*
|
||||||
|
* @return string The current WordPress version.
|
||||||
|
*/
|
||||||
|
function wp_get_wp_version() {
|
||||||
|
require ABSPATH . WPINC . '/version.php';
|
||||||
|
|
||||||
|
return $wp_version;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks compatibility with the current WordPress version.
|
* Checks compatibility with the current WordPress version.
|
||||||
*
|
*
|
||||||
|
@ -9006,21 +9023,3 @@ function wp_admin_notice( $message, $args = array() ) {
|
||||||
|
|
||||||
echo wp_kses_post( wp_get_admin_notice( $message, $args ) );
|
echo wp_kses_post( wp_get_admin_notice( $message, $args ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the current WordPress Version.
|
|
||||||
*
|
|
||||||
* Returns an unmodified version of `$wp_version`. Some plugins modify the
|
|
||||||
* global in an attempt to improve security through obscurity. This
|
|
||||||
* practice can cause errors in WordPress so the ability to get an
|
|
||||||
* unmodified version is needed.
|
|
||||||
*
|
|
||||||
* @since 6.7.0
|
|
||||||
*
|
|
||||||
* @return string The current WordPress Version.
|
|
||||||
*/
|
|
||||||
function wp_get_wp_version() {
|
|
||||||
require ABSPATH . WPINC . '/version.php';
|
|
||||||
|
|
||||||
return $wp_version;
|
|
||||||
}
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.7-alpha-58825';
|
$wp_version = '6.7-alpha-58826';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue