I'd like to be able to automatically uninstall certain plugins if they're detected (specifically Akismet and Hello Dolly), either by writing another plugin to do so or via my theme's functions.php file. Is that possible?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
Sure, just call the delete_plugins() function, found in |
|||
|
|
|
This'll deactivate and uninstall plugins you specify in the the NOTE: Due to the funky way WordPress activates plugins, we can't use an activation hook to do our work. Instead we check for the existence of an option, so as to ensure it only runs once per activation!
|
|||
|
|
