mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +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:
@@ -295,7 +295,8 @@ function list_plugin_updates() {
|
||||
}
|
||||
}
|
||||
|
||||
$compatible_php = ( empty( $plugin_data->update->requires_php ) || version_compare( phpversion(), $plugin_data->update->requires_php, '>=' ) );
|
||||
$requires_php = isset( $plugin_data->update->requires_php ) ? $plugin_data->update->requires_php : null;
|
||||
$compatible_php = is_php_version_compatible( $requires_php );
|
||||
|
||||
if ( ! $compatible_php && current_user_can( 'update_php' ) ) {
|
||||
$compat .= '<br>' . __( 'This update doesn’t work with your version of PHP.' ) . ' ';
|
||||
|
||||
Reference in New Issue
Block a user