[theme-reviewers] Note to theme reviewers about settings inthemes
Emil Uzelac
emil at themeid.com
Sun Jun 12 22:11:24 UTC 2011
Thanks Otto, I appreciate this :)
----
*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 5:04 PM, Otto <otto at ottodestruct.com> wrote:
> Several ways to solve that, the easiest of which is simply to use an
> isset() before trying to use the variables.
>
> But basically, I just mean it's a bad idea to set defaults into the
> database, ever. This would be a better approach:
>
> $foo = get_theme_mod('my_setting','default_value');
>
> That gets you the default_value if my_setting isn't set.
>
> -Otto
>
>
>
> On Sun, Jun 12, 2011 at 4:57 PM, Emil Uzelac <emil at themeid.com> wrote:
> > I see and understood. Thanks :)
> >
> > Weird thing about this is when defaults are not set and activated in
> Theme
> > Options, there are some bugs, i.e.
> > Other warnings: 2
> > -- Debug: Undefined index: home_subheadline on line 133 of
> > /wp-content/themes/shell/includes/theme-options.php
> > -- Debug: Undefined index: contact_email on line 238 of
> > /wp-content/themes/shell/includes/theme-options.php
> > And once "Save Options" they go away.
> > I am seeing this with Coraline as well. But when defaults are set this
> > "Undefined index" is not present.
> > Emil
> >
> _______________________________________________
> 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/20110612/4208ec2c/attachment.htm>
More information about the theme-reviewers
mailing list