Problems with the current register_uninstall_hook implementation
|Reported by:||x3r0ss||Owned by:||westi|
During my recent plugin development I have discovered some issues with the plugin register_uninstall_hook.
What it does is it saves the callback into the database, one of the problems is that it seems to re-save it every time the register_uninstall_hook function is called.
And second is that it stores the entire callback in the database even if you're using a class callback.
Now it seems that this entire uninstall hook is weird in some sense, because well the plugin is already deactivated so the hook would be inaccessible when deleting the plugin.
I think that either the plugin hook should be removed (And just leave uninstall.php for uninstalling) or that we find a way to fix it to work properly.
So to wrap it up.
- Somehow saving the hook resaves it every time (Possibly due to trying to save a callback to an object)
- uninstall hook is crooked the way it works now, need a reimplementation.
Hope we can work something out that would work best, I don't mind writing the implementation.