mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +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:
@@ -761,7 +761,8 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
}
|
||||
|
||||
$compatible_php = ( empty( $plugin_data['requires_php'] ) || version_compare( phpversion(), $plugin_data['requires_php'], '>=' ) );
|
||||
$requires_php = isset( $plugin['requires_php'] ) ? $plugin['requires_php'] : null;
|
||||
$compatible_php = is_php_version_compatible( $requires_php );
|
||||
$class = $is_active ? 'active' : 'inactive';
|
||||
$checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] );
|
||||
if ( $restrict_network_active || $restrict_network_only || in_array( $status, array( 'mustuse', 'dropins' ) ) || ! $compatible_php ) {
|
||||
|
||||
Reference in New Issue
Block a user