[wp-hackers] wp-hackers Digest, Vol 65, Issue 66

chip at chipbennett.net chip at chipbennett.net
Mon Jun 28 12:34:56 UTC 2010


Can themes also take advantage of the delete hook, via functions.php?

If so, I'll run this recommendation by the Theme Reviewers mail-list,
since we are currently updating/revising the general guidelines for
repository-hosted themes.

Chip

> I think this policy should apply to themes as well which may add quite
> a few options. As with plugins though there are a lot of reason a
> theme may be deactivated. We also have to allow for those who
> install/uninstall via FTP and not through the dashboard.
>
> Some kind of 'leave no trace' button you can click before deactivating
>  plugin or theme seems like a good solution. But given all the
> different things a plugin/theme can do, is there a way to standardize
> it enough to wrap in a  function that any theme/plugin could call?
>
>
> On 28 June 2010 18:18,  <wp-hackers-request at lists.automattic.com> wrote:
>> I've seen a lot of discussions on the list mentioning to leave no trace
>> when your plugin is deactivated by removing any options the plugin may
>> have added to the options table.  The problem with doing this is that
>> users may deactivate a plugin for reasons other than removing it
>> permanently; ie, they may be doing an upgrade and disable all plugins to
>> prevent conflicts that may occur.  When this is the case, removing all
>> of the options your plugin may have saved will cause the user's
>> preferences to be lost.  Here are a couple of options I see for this:
>>
>>
>> 1.  Create a delete action hook for plugins to permanently remove
>> options.  The issue with this, obviously, is that the plugin wouldn't be
>> running register it's delete action.  There may be a solution to this.
>>
>> 2.  The second suggestion would be to use the autoload field of the
>> options table to create a third status that would designate that the
>> option is no longer used.  Options with this new status could even be
>> cleaned out every so often.
>>
>> Thoughts?
>>
>> Michael Pretty
>> prettyboymp
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>




More information about the wp-hackers mailing list