diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php
index bdba99344a..469af3e8c4 100644
a
|
b
|
class WP_Plugin_Install_List_Table extends WP_List_Table { |
504 | 504 | |
505 | 505 | $wp_version = get_bloginfo( 'version' ); |
506 | 506 | |
507 | | $compatible_php = ( empty( $plugin['requires_php'] ) || version_compare( phpversion(), $plugin['requires_php'], '>=' ) ); |
| 507 | $compatible_php = wp_is_php_compatible( $plugin['requires_php'] ); |
508 | 508 | $tested_wp = ( empty( $plugin['tested'] ) || version_compare( $wp_version, $plugin['tested'], '<=' ) ); |
509 | | $compatible_wp = ( empty( $plugin['requires'] ) || version_compare( $wp_version, $plugin['requires'], '>=' ) ); |
| 509 | $compatible_wp = wp_is_wp_compatible( $plugin['requires'] ); |
510 | 510 | |
511 | 511 | $action_links = array(); |
512 | 512 | |
diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php
index cd4e6ea883..21551c7972 100644
a
|
b
|
class WP_Plugins_List_Table extends WP_List_Table { |
761 | 761 | |
762 | 762 | } |
763 | 763 | |
764 | | $compatible_php = ( empty( $plugin_data['requires_php'] ) || version_compare( phpversion(), $plugin_data['requires_php'], '>=' ) ); |
765 | | $class = $is_active ? 'active' : 'inactive'; |
766 | | $checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] ); |
767 | | if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ) ) || ! $compatible_php ) { |
| 764 | $requires_php = isset( $plugin_data['requires_php'] ) ? $plugin_data['requires_php'] : null; |
| 765 | $class = $is_active ? 'active' : 'inactive'; |
| 766 | $checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] ); |
| 767 | if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ) ) || ! wp_is_php_compatible( $requires_php ) ) { |
768 | 768 | $checkbox = ''; |
769 | 769 | } else { |
770 | 770 | /* translators: %s: plugin name */ |
diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php
index 99939b04b9..607a781dc4 100644
a
|
b
|
function install_plugin_information() { |
756 | 756 | <?php |
757 | 757 | $wp_version = get_bloginfo( 'version' ); |
758 | 758 | |
759 | | $compatible_php = ( empty( $api->requires_php ) || version_compare( phpversion(), $api->requires_php, '>=' ) ); |
| 759 | $compatible_php = wp_is_php_compatible( $api->requires_php ); |
760 | 760 | $tested_wp = ( empty( $api->tested ) || version_compare( $wp_version, $api->tested, '<=' ) ); |
761 | | $compatible_wp = ( empty( $api->requires ) || version_compare( $wp_version, $api->requires, '>=' ) ); |
| 761 | $compatible_wp = wp_is_wp_compatible( $api->requires ); |
762 | 762 | |
763 | 763 | if ( ! $compatible_php ) { |
764 | 764 | echo '<div class="notice notice-error notice-alt"><p>'; |
diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php
index 7dd083bbf1..f8f6e525fc 100644
a
|
b
|
function wp_plugin_update_row( $file, $plugin_data ) { |
400 | 400 | $active_class = is_plugin_active( $file ) ? ' active' : ''; |
401 | 401 | } |
402 | 402 | |
403 | | $compatible_php = ( empty( $response->requires_php ) || version_compare( phpversion(), $response->requires_php, '>=' ) ); |
| 403 | $compatible_php = wp_is_php_compatible( $response->requires_php ); |
404 | 404 | $notice_type = $compatible_php ? 'notice-warning' : 'notice-error'; |
405 | 405 | |
406 | 406 | echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message notice inline ' . $notice_type . ' notice-alt"><p>'; |
diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
index 7239243333..82edef4755 100644
a
|
b
|
function list_plugin_updates() { |
295 | 295 | } |
296 | 296 | } |
297 | 297 | |
298 | | $compatible_php = ( empty( $plugin_data->update->requires_php ) || version_compare( phpversion(), $plugin_data->update->requires_php, '>=' ) ); |
| 298 | $compatible_php = wp_is_php_compatible( $plugin_data->update->requires_php ); |
299 | 299 | |
300 | 300 | if ( ! $compatible_php && current_user_can( 'update_php' ) ) { |
301 | 301 | $compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' '; |