oh, hey; that makes sense, too!<br><br><div class="gmail_quote">On Sat, Jan 15, 2011 at 7:04 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;">
Actually, I believe it only needs to be set globally. The easy way to<br>
do this is to set it outside that hook, and that&#39;s what twentyten<br>
does, but this would be equally valid:<br>
<br>
add_action(&#39;after_theme_setup&#39;,&#39;theme_setup&#39;);<br>
function theme_setup() {<br>
  global $content_width;<br>
  if ( ! isset( $content_width ) )<br>
    $content_width=640;<br>
}<br>
<br>
Also equally valid would be to set $_GLOBALS[&#39;content_width&#39;] = 640;<br>
or similar. Same thing, really.<br>
<br>
However, for theme compatibility (and to allow child themes to<br>
override it) the &quot;if ( ! isset( $content_width ) )&quot; should be used as<br>
well.<br>
<br>
-Otto<br>
<div><div></div><div class="h5"><br>
<br>
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; So, I just realized something today regarding setting $content_width: it<br>
&gt; must be set *before* the after_theme_setup hook.<br>
&gt; Just a mental note to myself, to check functions.php to ensure that the call<br>
&gt; to set $content_width isn&#39;t inside of a theme setup function that gets<br>
&gt; called on after_theme_setup. I thought I&#39;d share that with everyone, just in<br>
&gt; case I&#39;m not the only one who needed that clarification. :)<br>
&gt; Chip<br>
</div></div>&gt; _______________________________________________<br>
&gt; theme-reviewers mailing list<br>
&gt; <a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
&gt; <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
&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>
</blockquote></div><br>