Admin: Improve logic of PHP version check on about page.

Props noisysocks, peterwilsoncc.
See #46161.


Built from https://develop.svn.wordpress.org/trunk@44735


git-svn-id: http://core.svn.wordpress.org/trunk@44567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson
2019-02-08 01:53:51 +00:00
parent e24bf1c278
commit 729c8e875f
4 changed files with 50 additions and 47 deletions

View File

@@ -88,7 +88,10 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<div class="feature-section one-col cta">
<?php if ( true ) : ?>
<?php
$response = wp_check_php_version();
if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) :
?>
<p><em><?php _e( 'WordPress has detected your site is running an outdated version of PHP. You will see this notice on your dashboard with instructions for contacting your host.' ); ?></em></p>
<?php endif; ?>