And yes, I meant &quot;after_setup_theme&quot;.<div><br></div><div>I shouldn&#39;t try to compose emails while simultaneously giving the girls baths...</div><div><br></div><div>Chip<br><br><div class="gmail_quote">On Sat, Jan 15, 2011 at 7:05 PM, Otto <span dir="ltr">&lt;<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Sorry, I meant &quot;after_setup_theme&quot;. I always get that wrong.<br>
<font color="#888888"><br>
-Otto<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
On Sat, Jan 15, 2011 at 8:04 PM, Otto &lt;<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>&gt; wrote:<br>
&gt; Actually, I believe it only needs to be set globally. The easy way to<br>
&gt; do this is to set it outside that hook, and that&#39;s what twentyten<br>
&gt; does, but this would be equally valid:<br>
&gt;<br>
&gt; add_action(&#39;after_theme_setup&#39;,&#39;theme_setup&#39;);<br>
&gt; function theme_setup() {<br>
&gt;  global $content_width;<br>
&gt;  if ( ! isset( $content_width ) )<br>
&gt;    $content_width=640;<br>
&gt; }<br>
&gt;<br>
&gt; Also equally valid would be to set $_GLOBALS[&#39;content_width&#39;] = 640;<br>
&gt; or similar. Same thing, really.<br>
&gt;<br>
&gt; However, for theme compatibility (and to allow child themes to<br>
&gt; override it) the &quot;if ( ! isset( $content_width ) )&quot; should be used as<br>
&gt; well.<br>
&gt;<br>
&gt; -Otto<br>
&gt;<br>
&gt;<br>
&gt; On Sat, Jan 15, 2011 at 7:54 PM, Chip Bennett &lt;<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>&gt; wrote:<br>
&gt;&gt; So, I just realized something today regarding setting $content_width: it<br>
&gt;&gt; must be set *before* the after_theme_setup hook.<br>
&gt;&gt; Just a mental note to myself, to check functions.php to ensure that the call<br>
&gt;&gt; to set $content_width isn&#39;t inside of a theme setup function that gets<br>
&gt;&gt; called on after_theme_setup. I thought I&#39;d share that with everyone, just in<br>
&gt;&gt; case I&#39;m not the only one who needed that clarification. :)<br>
&gt;&gt; Chip<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; theme-reviewers mailing list<br>
&gt;&gt; <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
&gt;&gt; <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<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>
</div></div></blockquote></div><br></div>