From 154704ee5f9b436cab8b80331cd609de84c1be5d Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Tue, 13 Feb 2024 13:22:24 +0000 Subject: [PATCH] Plugins: Disable bulk actions for dependencies. The intended behaviour of Plugin Dependencies is that dependencies cannot be deleted until their dependents are deleted. While the 'Delete' link was removed from the plugin row, the bulk actions checkbox remained enabled, allowing for deletion of dependencies through bulk actions. This was unintended behaviour and the bulk actions checkbox is now disabled as intended. Follow-up to [57545]. Props johnbillion, afragen, knutsp, huzaifaalmesbah, mukesh27, costdev. Fixes #60471. git-svn-id: https://develop.svn.wordpress.org/trunk@57620 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-plugins-list-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index ad0e6d7eb8..95deffe7b0 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -1080,7 +1080,7 @@ class WP_Plugins_List_Table extends WP_List_Table { $checkbox_id = 'checkbox_' . md5( $plugin_file ); $disabled = ''; - if ( $has_active_dependents || $has_unmet_dependencies ) { + if ( $has_dependents || $has_unmet_dependencies ) { $disabled = 'disabled'; }