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

Chip Bennett chip at chipbennett.net
Sat Feb 4 14:14:14 UTC 2012


Why do you need two arrays for site options and page options? I'm assuming
you've also separated them into two separate settings pages? Again, if so:
why?

As for set_theme_mod()<http://codex.wordpress.org/Function_Reference/set_theme_mod>and
get_theme_mod()<http://codex.wordpress.org/Function_Reference/get_theme_mod>,
Otto has written about using them here on the mail list previously. For
example:
http://lists.wordpress.org/pipermail/theme-reviewers/2011-January/003949.html

(Basically, using *_theme_mod() saves/retrieves your setting from the same
DB entry that holds other Theme mods, such as menus, widgets, background
image, header image, etc.)

Chip

On Sat, Feb 4, 2012 at 12:58 AM, Satish Gandham <satish.iitg at gmail.com>wrote:

> *Themes are required to save options in a single array, rather than
> create multiple options for its settings page. Use of set_theme_mod and
> get_theme_mod handles this for you, as does using the Settings API.
> *
> *
> *I'm using settings API for my options page. I separated design and site
> options into two pages and I'm saving them in two arrays, is that
> acceptable?
>
>
> *Use of set_theme_mod and get_theme_mod handles this for you
> *
> Can someone elaborate on this?*
> **
>
> *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/20120204/3a78071d/attachment.htm>


More information about the theme-reviewers mailing list