diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
index d157a46764..7239243333 100644
--- a/wp-admin/update-core.php
+++ b/wp-admin/update-core.php
@@ -294,6 +294,19 @@ function list_plugin_updates() {
$compat .= '
' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version );
}
}
+
+ $compatible_php = ( empty( $plugin_data->update->requires_php ) || version_compare( phpversion(), $plugin_data->update->requires_php, '>=' ) );
+
+ if ( ! $compatible_php && current_user_can( 'update_php' ) ) {
+ $compat .= '
' . __( 'This update doesn’t work with your version of PHP.' ) . ' ';
+ /* translators: %s: Update PHP page URL */
+ $compat .= sprintf(
+ __( 'Learn more about updating PHP.' ),
+ esc_url( wp_get_update_php_url() )
+ );
+ $compat .= '
' . wp_get_update_php_annotation() . '';
+ }
+
// Get the upgrade notice for the new plugin version.
if ( isset( $plugin_data->update->upgrade_notice ) ) {
$upgrade_notice = '
' . strip_tags( $plugin_data->update->upgrade_notice );
@@ -315,6 +328,7 @@ function list_plugin_updates() {
?>
- + Name; ?> Version, $plugin_data->update->new_version ); - echo ' ' . $details . $compat . $upgrade_notice; + echo ' ' . $details . $compat . $upgrade_notice; ?>