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"><<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;">
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's what twentyten<br>
does, but this would be equally valid:<br>
<br>
add_action('after_theme_setup','theme_setup');<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['content_width'] = 640;<br>
or similar. Same thing, really.<br>
<br>
However, for theme compatibility (and to allow child themes to<br>
override it) the "if ( ! isset( $content_width ) )" 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 <<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>> wrote:<br>
> So, I just realized something today regarding setting $content_width: it<br>
> must be set *before* the after_theme_setup hook.<br>
> Just a mental note to myself, to check functions.php to ensure that the call<br>
> to set $content_width isn't inside of a theme setup function that gets<br>
> called on after_theme_setup. I thought I'd share that with everyone, just in<br>
> case I'm not the only one who needed that clarification. :)<br>
> Chip<br>
</div></div>> _______________________________________________<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>
><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>