From 51e92ced21af87d54fce5f9d1017cef7e85ded45 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 12 Jul 2020 10:53:36 +0000 Subject: [PATCH] Upgrade/Install: Use `is_php_version_compatible()` and `is_wp_version_compatible()` in plugin and theme requirement checks. Follow-up to [48390]. Props afragen. See #9757. git-svn-id: https://develop.svn.wordpress.org/trunk@48448 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-plugin-installer-skin.php | 13 ++++++------- .../includes/class-theme-installer-skin.php | 11 ++++++++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/wp-admin/includes/class-plugin-installer-skin.php b/src/wp-admin/includes/class-plugin-installer-skin.php index 59853c47d3..af95f038e4 100644 --- a/src/wp-admin/includes/class-plugin-installer-skin.php +++ b/src/wp-admin/includes/class-plugin-installer-skin.php @@ -214,7 +214,8 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { $table .= '' . esc_html( __( 'Current' ) ) . ''; $table .= '' . esc_html( __( 'Uploaded' ) ) . ''; - $is_same_plugin = true; // Let's consider only these rows + $is_same_plugin = true; // Let's consider only these rows. + foreach ( $rows as $field => $label ) { $old_value = ! empty( $current_plugin_data[ $field ] ) ? $current_plugin_data[ $field ] : '-'; $new_value = ! empty( $this->upgrader->new_plugin_data[ $field ] ) ? $this->upgrader->new_plugin_data[ $field ] : '-'; @@ -248,9 +249,8 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { $blocked_message = '

' . esc_html( __( 'The plugin cannot be updated due to the following:' ) ) . '

'; $blocked_message .= '