diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
index abc4f8418f..614d13b813 100644
--- a/wp-admin/update-core.php
+++ b/wp-admin/update-core.php
@@ -287,6 +287,18 @@ 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( substr( PHP_VERSION, 0, strlen( $plugin_data->update->requires_php ) ), $plugin_data->update->requires_php, '>=' ) );
+
+ if ( ! $compatible_php ) {
+ $compat .= '
' . __( 'This update doesn’t work with your version of PHP.' ) . ' ';
+ /* translators: %s: Updating PHP page URL */
+ $compat .= sprintf(
+ __( 'Learn more about updating PHP.' ),
+ esc_url( __( 'https://wordpress.org/support/update-php/' ) )
+ );
+ }
+
// 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 );
@@ -308,32 +320,34 @@ function list_plugin_updates() {
?>
- - Name; ?> - Version, - $plugin_data->update->new_version - ); - echo ' ' . $details . $compat . $upgrade_notice; + +
+ + Name ); ?> + Version ), + esc_attr( $plugin_data->update->new_version ) + ); + echo ' ' . $details . $compat . $upgrade_notice; ?>