[theme-reviewers] WP.org theme preview
otto at ottodestruct.com
Wed Aug 3 21:47:39 UTC 2011
On Wed, Aug 3, 2011 at 12:50 PM, c.bavota <c at bavotasan.com> wrote:
> Hey all,
> I just had my theme PressWork approved on WP.org but the theme preview
> looks a little wacky since none of the options are set until it is activated
> for the first time. Is there any way to test how the theme will preview
> before I upload the next version? Or are there any guidelines for settings
> up some defaults for the preview?
Basically, you wrote your theme wrong. It should function properly without
any options being set at all. Options are *optional* and you should have
default fallbacks for all of them.
Setting options on activation is a big no-no. Don't do it. I'll remove a
theme from the system for doing that. It's bad code, bad karma, and it often
breaks the theme previewer.
Write your theme options code such that it doesn't need to have the options
actually there to begin with. get_option has a second parameter to specify a
default if needed. If you're using one-big-options-array, then you should
have code to account for the fact that the option might not be in the array.
That sort of thing.
If you have specific questions on a specific piece of code and how to make
it work properly, I'm more than happy to give you the answers to that. Just
post your code sample and ask. :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theme-reviewers