Plugin bulk deletion attempts to define WP_UNINSTALL_PLUGIN constant multiple times
|Reported by:||jdgrimes||Owned by:|
The WP_UNINSTALL_PLUGIN constant is defined by uninstall_plugin() before the plugin's uninstall.php file is included (if the plugin has one). When deleting multiple plugins with uninstall.php files, the function attempts to define this constant each time, which will result in a notice.
PHP Notice: Constant WP_UNINSTALL_PLUGIN already defined
The notice will never be noticed by most users, because it will be silenced by default, but this could be an issue if plugins are checking for the value of WP_UNINSTALL_PLUGIN, as recommended here (which is linked to from the codex), and not just whether it is defined.
I don't have a good solution, sorry.
Change History (10)
- Component changed from Plugins to Admin APIs
- Focuses administration added
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.9