[wp-hackers] Theme options in db: automatic deletion?

Otto otto at ottodestruct.com
Tue Nov 1 10:56:45 UTC 2011


On Tue, Nov 1, 2011 at 5:04 AM, Ade Walker <photofantaisie at gmail.com> wrote:
> Just a question to gauge views on this subject.
>
> Well-written plugins will use the deactivation hook or the uninstall.php
> method to remove their options from the wp_options table when the plugin is
> deleted. Themes, however, tend not to do this (well, I've personally not
> yet used one that does). So here's my question: in terms of best practice,
> shouldn't themes automatically remove their db options when deleted via
> Appearance>Themes panel? Just to be clear - I'm not talking
> about deleting options on deactivation of the theme, only on theme deletion.

Themes don't have activation and deactivation hooks.

-Otto


More information about the wp-hackers mailing list