[theme-reviewers] Themes are required to save options in a single array

Chip Bennett chip at chipbennett.net
Thu Feb 9 13:47:08 UTC 2012


I can promise you: use of theme_mods will NOT become *required* any time
soon. For one, we do our best to avoid such drastic changes; for another,
there is certainly no consensus that use of theme_mods is even a "best
practice" - especially vs use of the Settings API.

At this point, at most, I could see use of theme_mods being *recommended*,
alongside use of the Settings API, with the choice between the two being
optional.

The purpose of the rule is not only conservation of database performance,
but also good database behavior on the part of Themes, *especially* since
Themes do not (yet) have uninstall or delete hooks, that can be used to
remove DB entries. Manual DB cleanup is much easier when removing one DB
entry, as opposed to multiple DB entries.

Other than extreme edge cases (for which the WPTRT *always* reserves the
right to evaluate and to make exceptions), I've not yet heard a legitimate
argument *against* storing Theme options in a single DB entry. The usual
argument generally boils down to a matter of inconvenience, which while I
understand, I do not consider to be a valid argument.

Chip

On Wed, Feb 8, 2012 at 9:43 PM, Satish Gandham <satish.iitg at gmail.com>wrote:

> As Sayontan and Otto suggested, I can pull the missing values from the db
> and use the validation function.
> But, I'm worried if some new specification comes up about the use of
> theme_mod functions in the next one or two months ( review que is two
> months long ).
>
> What is the purpose of this rule? Does it really have significant effect
> on performance? 100 and 100+1 or 1000 and 1000+1 entries, does that really
> make a difference?
>
>
> Satish Gandham
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120209/c8559ba7/attachment.htm>


More information about the theme-reviewers mailing list