mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Site health:
- Add a check to `wp_check_php_version()` whether the current PHP version is lower than the next (desired) minimum version. - Set the next desired minimum PHP version to 7.2. - Use that check to update the warnings in the `wp_dashboard_php_nag()` widget, and on the Site Health screen. Props Clorith, SergeyBiryukov, ironprogrammer, azaozz. See #56199. git-svn-id: https://develop.svn.wordpress.org/trunk@54169 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1585,7 +1585,8 @@ function wp_check_php_version() {
|
||||
* 'recommended_version' - string - The PHP version recommended by WordPress.
|
||||
* 'is_supported' - boolean - Whether the PHP version is actively supported.
|
||||
* 'is_secure' - boolean - Whether the PHP version receives security updates.
|
||||
* 'is_acceptable' - boolean - Whether the PHP version is still acceptable for WordPress.
|
||||
* 'is_acceptable' - boolean - Whether the PHP version is still acceptable or warnings
|
||||
* should be shown and an update recommended.
|
||||
*/
|
||||
$response = json_decode( wp_remote_retrieve_body( $response ), true );
|
||||
|
||||
@@ -1613,5 +1614,15 @@ function wp_check_php_version() {
|
||||
$response['is_acceptable'] = (bool) apply_filters( 'wp_is_php_version_acceptable', true, $version );
|
||||
}
|
||||
|
||||
$response['is_lower_than_future_minimum'] = false;
|
||||
|
||||
// The minimum supported PHP version will be updated to 7.2. Check if the current version is lower.
|
||||
if ( version_compare( $version, '7.2', '<' ) ) {
|
||||
$response['is_lower_than_future_minimum'] = true;
|
||||
|
||||
// Force showing of warnings.
|
||||
$response['is_acceptable'] = false;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user