<font color="#333333"><font size="2"><font face="arial,helvetica,sans-serif">Thanks Otto, I appreciate this :)<br clear="all"></font></font></font><div><div><font face="arial, helvetica, sans-serif">----</font></div><div><font face="arial, helvetica, sans-serif"><strong>Emil Uzelac</strong> | ThemeID | T: 224-444-0006 | Twitter: @EmilUzelac | E: <a href="mailto:emil@themeid.com" target="_blank">emil@themeid.com</a> | <a href="http://themeid.com/" target="_blank">http://themeid.com</a></font></div>
<div><font color="#999999" face="arial, helvetica, sans-serif">Make everything as simple as possible, but not simpler. - Albert Einstein</font></div><br>
<br><br><div class="gmail_quote">On Sun, Jun 12, 2011 at 5:04 PM, Otto <span dir="ltr"><<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Several ways to solve that, the easiest of which is simply to use an<br>
isset() before trying to use the variables.<br>
<br>
But basically, I just mean it's a bad idea to set defaults into the<br>
database, ever. This would be a better approach:<br>
<br>
$foo = get_theme_mod('my_setting','default_value');<br>
<br>
That gets you the default_value if my_setting isn't set.<br>
<font color="#888888"><br>
-Otto<br>
</font><div class="im"><br>
<br>
<br>
On Sun, Jun 12, 2011 at 4:57 PM, Emil Uzelac <<a href="mailto:emil@themeid.com">emil@themeid.com</a>> wrote:<br>
> I see and understood. Thanks :)<br>
><br>
> Weird thing about this is when defaults are not set and activated in Theme<br>
> Options, there are some bugs, i.e.<br>
> Other warnings: 2<br>
> -- Debug: Undefined index: home_subheadline on line 133 of<br>
> /wp-content/themes/shell/includes/theme-options.php<br>
> -- Debug: Undefined index: contact_email on line 238 of<br>
> /wp-content/themes/shell/includes/theme-options.php<br>
> And once "Save Options" they go away.<br>
> I am seeing this with Coraline as well. But when defaults are set this<br>
> "Undefined index" is not present.<br>
> Emil<br>
><br>
</div><div><div></div><div class="h5">_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br></div>