mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Plugins: Introduce is_wp_version_compatible() and is_php_version_compatible() for checking compatibility with the current WordPress or PHP version.
Props afragen. Fixes #46599. git-svn-id: https://develop.svn.wordpress.org/trunk@45185 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -400,7 +400,8 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
||||
$active_class = is_plugin_active( $file ) ? ' active' : '';
|
||||
}
|
||||
|
||||
$compatible_php = ( empty( $response->requires_php ) || version_compare( phpversion(), $response->requires_php, '>=' ) );
|
||||
$requires_php = isset( $response->requires_php ) ? $response->requires_php : null;
|
||||
$compatible_php = is_php_version_compatible( $requires_php );
|
||||
$notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
|
||||
|
||||
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>';
|
||||
|
||||
Reference in New Issue
Block a user