<font color="#333333"><font size="2"><font face="arial,helvetica,sans-serif">I see and understood. Thanks :)<br clear="all"></font></font></font><div><div><div><font face="arial, helvetica, sans-serif" color="#333333"><br>
</font></div><div><font face="arial, helvetica, sans-serif" color="#333333">Weird thing about this is when defaults are not set and activated in Theme Options, there are some bugs, i.e.</font></div><div><font face="arial, helvetica, sans-serif" color="#333333"><br>
</font></div><div><font face="arial, helvetica, sans-serif" color="#333333">Other warnings: 2</font></div><div><font face="arial, helvetica, sans-serif" color="#333333"><br></font></div><div><font face="arial, helvetica, sans-serif" color="#333333">-- Debug: Undefined index: home_subheadline on line 133 of /wp-content/themes/shell/includes/theme-options.php</font></div>
<div><font face="arial, helvetica, sans-serif" color="#333333">-- Debug: Undefined index: contact_email on line 238 of /wp-content/themes/shell/includes/theme-options.php</font></div><div><font face="arial, helvetica, sans-serif" color="#333333"><br>
</font></div><div><font face="arial, helvetica, sans-serif" color="#333333">And once "Save Options" they go away.</font></div><div><font face="arial, helvetica, sans-serif" color="#333333"><br></font></div><div>
<font face="arial, helvetica, sans-serif" color="#333333">I am seeing this with Coraline as well. But when defaults are set this "</font><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, helvetica, sans-serif; ">Undefined index" is not present.</span></div>
<div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, helvetica, sans-serif; "><br></span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, helvetica, sans-serif; ">Emil</span></div>
<meta charset="utf-8"><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></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 4:44 PM, Philip M. Hofer (Frumph) <span dir="ltr"><<a href="mailto:philip@frumph.net">philip@frumph.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:'Calibri';color:#000000;font-size:12pt">
<div>pretty sure that’s what otto wants to avoid, since on activation that will
create those update_options in the database, he wants to use the predefined
options at all times “until” someone hits the save in the theme options. I’m
assuming because people switching themes all the time to check them out to see
if they want to use a theme – don’t want to overload the database with a bunch
of entries for themes not in use (at least that’s my reasoning why it would be
important)</div>
<div> </div>
<div> </div>
<div style="font-style:normal;display:inline;font-family:'Calibri';color:#000000;font-size:small;font-weight:normal;text-decoration:none">
<div style="font:10pt tahoma">
<div> </div>
<div style="background:#f5f5f5">
<div><b>From:</b> <a title="emil@themeid.com" href="mailto:emil@themeid.com" target="_blank">Emil Uzelac</a> </div>
<div><b>Sent:</b> Sunday, June 12, 2011 2:41 PM</div>
<div><b>To:</b> <a title="theme-reviewers@lists.wordpress.org" href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a>
</div>
<div><b>Subject:</b> Re: [theme-reviewers] Note to theme reviewers about
settings inthemes</div></div></div>
<div> </div></div>
<div style="font-style:normal;display:inline;font-family:'Calibri';color:#000000;font-size:small;font-weight:normal;text-decoration:none"><div><div></div><div class="h5"><font color="#333333"><font size="2"><font face="arial,helvetica,sans-serif">Or like in
Coraline Theme?<br clear="all"></font></font></font>
<div>
<div>
<div><font color="#333333" face="arial, helvetica, sans-serif"><br></font></div>
<div><font color="#333333" face="arial, helvetica, sans-serif">
<div>/**</div>
<div>* Set default options</div>
<div>*/</div>
<div>function coraline_default_options() {</div>
<div><span style="white-space:pre-wrap"></span>$options =
get_option( 'coraline_theme_options' );</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>if ( ! isset(
$options['color_scheme'] ) ) {</div>
<div><span style="white-space:pre-wrap"></span>$options['color_scheme'] = 'light';</div>
<div><span style="white-space:pre-wrap"></span>update_option(
'coraline_theme_options', $options );</div>
<div><span style="white-space:pre-wrap"></span>}</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>if ( ! isset(
$options['theme_layout'] ) ) {</div>
<div><span style="white-space:pre-wrap"></span>$options['theme_layout'] = 'content-sidebar';</div>
<div><span style="white-space:pre-wrap"></span>update_option(
'coraline_theme_options', $options );</div>
<div><span style="white-space:pre-wrap"></span>}</div>
<div>}</div>
<div>add_action( 'init', 'coraline_default_options' );</div></font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div>
<div><font face="arial, helvetica, sans-serif"><br></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 4:35 PM, Philip M. Hofer (Frumph)
<span dir="ltr"><<a href="mailto:philip@frumph.net" target="_blank">philip@frumph.net</a>></span> wrote:<br>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">I am not having an issue with the that being a 'best
practice' rule., maybe not a requirement [at this time] but definitely best
practice.<br><br>Are you saying this?<br><br>$default_theme_options =
array('someoption' => true, 'someotheroption' => false);<br>// if
'theme_options' returns false use all of the parameters from
$default_theme_options<br>$theme_options = get_option('theme_options',
$default_theme_options);<br><br><br><br><br>-----Original Message----- From:
Otto<br>Sent: Sunday, June 12, 2011 1:26 PM<br>To: WP Theme Reviewers Mailing
List<br>Subject: [theme-reviewers] Note to theme reviewers about settings in
themes
<div>
<div></div>
<div><br><br>This is just a note about a rule that I think should be
added to the<br>theme review process:<br><br>- Themes should not do anything
to the database merely by virtue of<br>being activated.<br><br>By that, I mean
that having a theme check for a setting, like<br>get_option or get_theme_mod
and then calling set_option or<br>set_theme_mod to set it to some default is
wrong.<br><br>Both get_option and get_theme_mod accept a second parameter of
a<br>default setting. If I call get_option('whatever',123) and there is
no<br>whatever option, then that will return 123.<br><br>Use the defaults
properly. Don't set them just because they're not
there.<br><br>-Otto<br>_______________________________________________<br>theme-reviewers
mailing list<br><a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>_______________________________________________<br>theme-reviewers mailing
list<br><a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
<div> </div></div></div>
</div></div><p>
</p><hr><div class="im">
_______________________________________________<br>theme-reviewers mailing
list<br><a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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><p></p></div></div></div></div>
<br>_______________________________________________<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>
<br></blockquote></div><br></div></div>