mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Plugins/Themes: Allow to install/activate plugins/themes which require the WordPress version currently in development.
Twenty Twenty-Two requires WordPress 5.9 but currently can't be (re)activated in the 5.9 branch because `version_compare( '5.9-RC3-52627', '5.9', '>=' )` as used by `is_wp_version_compatible()` returns `false`. To appreciate the testing of upcoming versions any `-alpha`, `-RC`, `-beta` suffixes are now stripped off from the WordPress version before checking for compatibility. Fixes #54882. Built from https://develop.svn.wordpress.org/trunk@52628 git-svn-id: http://core.svn.wordpress.org/trunk@52216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0c51a7f11b
commit
70a7faa9dc
@ -8342,11 +8342,18 @@ function clean_dirsize_cache( $path ) {
|
||||
*
|
||||
* @since 5.2.0
|
||||
*
|
||||
* @global string $wp_version WordPress version.
|
||||
*
|
||||
* @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 ) {
|
||||
return empty( $required ) || version_compare( get_bloginfo( 'version' ), $required, '>=' );
|
||||
global $wp_version;
|
||||
|
||||
// Strip off any -alpha, -RC, -beta, -src suffixes.
|
||||
list( $version ) = explode( '-', $wp_version );
|
||||
|
||||
return empty( $required ) || version_compare( $version, $required, '>=' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52626';
|
||||
$wp_version = '6.0-alpha-52628';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user