[theme-reviewers] Note to theme reviewers about settings in themes

Sayontan Sinha sayontan at gmail.com
Mon Jun 13 03:33:23 UTC 2011


I would like to add to Justin's suggestion and highlight that the uninstall
hook should be treated differently from the deactivation hook.

The problem with forcing cleanup on a deactivation hook is that occasionally
the WP servers hand out bad copies of themes (I have had that happen quite a
few times on my theme, where users sporadically report broken downloads -
the fix involved Otto rebuilding the download on the faulty server).
Depending on what got downloaded, WP either automatically deactivates the
theme (e.g. missing or broken style.css) and defaults to TwentyTen, or the
user gets a white screen (missing or broken functions.php). In the former at
least, having a deactivation hook do cleanups is fraught with the user
losing hours of work, because the switch to TwentyTen happens without the
user intending to do it.

Hence cleanup of options should be introduced only upon uninstall, and not
deactivation.

On Mon, Jun 13, 2011 at 8:10 PM, Justin Tadlock <justin at justintadlock.com>wrote:

> **
> The problem with themes cleaning up after themselves is simply that there's
> no uninstall hook.  Once we get that (plus some activate/deactivate hooks),
> I'd have no problem in setting some repository rules for themes to delete
> options on uninstall.
>
> As far as using the $default parameter of get_option() and not setting
> defaults, that can be good practice.  However, I see no reason themes
> shouldn't be setting up some defaults using add_option().  Of course,
> there's no activation hook, so some theme authors are just dropping some
> code into functions.php instead of using a hook (load-themes.php might be a
> good one) to auto-set default options.
>
>
> On 6/12/2011 10:06 PM, Emil Uzelac wrote:
>
> Or for future release of WP when Theme is deleted all that was associated
> with that specific Theme gets deleted as well. Not all Authors will comply
> with WP guides and not all Themes are downloaded from the repository.
>
>  ----
> *Emil Uzelac* | ThemeID | T: 224-444-0006 | Twitter: @EmilUzelac | E:
> emil at themeid.com | http://themeid.com
> Make everything as simple as possible, but not simpler. - Albert Einstein
>
>
>
> On Sun, Jun 12, 2011 at 10:03 PM, Angelo Bertolli <
> angelo.bertolli at gmail.com> wrote:
>
>> On 6/12/2011 10:59 PM, Syahir Hakim wrote:
>>
>>> I don't think it's only the theme reviewers who are installing and
>>> trying a lot of themes. It is not unusual at all for regular or
>>> first-timer WP users to try a lot of themes before they settle on one
>>> that they really like. Trying more than 10 themes is quite normal for a
>>> first-timer WP user, I think, and some of my theme users even reported
>>> that they've tried 40+ themes.
>>>
>>
>>  It sounds like WP should have a way of forcing options to be associated
>> with their themes, and cleanup options that are independant of theme code.
>>  For example add_option would automatically associate the option with a
>> particular theme, maybe by directory name.  Then after such a theme no
>> longer exists or is deactivated, WP presents an option to "clean up theme
>> options for theme X"
>>
>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>
>
> _______________________________________________
> theme-reviewers mailing listtheme-reviewers at lists.wordpress.orghttp://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>


-- 
Sayontan Sinha
http://mynethome.net | http://mynethome.net/blog
--
Beating Australia in Cricket is like killing a celebrity. The death gets
more coverage than the crime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110612/35d86cee/attachment.htm>


More information about the theme-reviewers mailing list