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
This commit is contained in:
Colin Stewart 2024-02-13 13:22:24 +00:00
parent add2b40635
commit 154704ee5f

View File

@ -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';
}