Repository navigation
Commit f76fc76
committed
Plugins: Clarify dependency notes on the Plugins screen.
Updates `WP_Plugins_List_Table::add_dependents_to_dependency_plugin_row()` to display a note matching the action blocked by a plugin's dependents:
* Active plugins with active dependents note that the plugin cannot be deactivated until the plugins requiring it are deactivated.
* Inactive plugins note that the plugin cannot be deleted until the plugins requiring it are deleted.
* No note is displayed if neither action is blocked, including for plugins with a circular dependency.
Previously the note stated that the plugin could not be deactivated or deleted until the plugins requiring it were deactivated or deleted, regardless of the plugin's state. This was inaccurate as deactivating the dependents does not allow a plugin to be deleted.
The note is now displayed as an inline warning via `wp_get_admin_notice()`.
The tests are updated to account for the user's capabilities and to cover the notices on the network Plugins screen separately.
Developed in: WordPress#12732
Props hbhalodia, joedolson, huzaifaalmesbah, softglaze.
Fixes #64493.
git-svn-id: https://develop.svn.wordpress.org/trunk@65531 602fd350-edb4-49c9-b593-d223f7449a821 parent 322bffc commit f76fc76
2 files changed
Lines changed: 99 additions & 9 deletions
File tree
- src/wp-admin/includes
- tests/phpunit/tests/admin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
1639 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
1640 | 1669 | | |
1641 | 1670 | | |
1642 | 1671 | | |
| |||
1646 | 1675 | | |
1647 | 1676 | | |
1648 | 1677 | | |
1649 | | - | |
| 1678 | + | |
1650 | 1679 | | |
1651 | | - | |
| 1680 | + | |
1652 | 1681 | | |
1653 | 1682 | | |
1654 | 1683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | | - | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
42 | | - | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
47 | 104 | | |
48 | 105 | | |
49 | 106 | | |
| |||
78 | 135 | | |
79 | 136 | | |
80 | 137 | | |
81 | | - | |
| 138 | + | |
| 139 | + | |
82 | 140 | | |
83 | | - | |
| 141 | + | |
| 142 | + | |
84 | 143 | | |
85 | 144 | | |
86 | 145 | | |
87 | 146 | | |
| 147 | + | |
88 | 148 | | |
89 | 149 | | |
90 | 150 | | |
91 | 151 | | |
92 | 152 | | |
93 | 153 | | |
| 154 | + | |
94 | 155 | | |
95 | 156 | | |
96 | | - | |
97 | | - | |
| 157 | + | |
| 158 | + | |
98 | 159 | | |
99 | 160 | | |
100 | 161 | | |
| |||
0 commit comments