[theme-reviewers] add_editor_style() question

Chip Bennett chip at chipbennett.net
Sun Dec 30 00:52:24 UTC 2012


$content_width should also be defined inside of a callback, hooked into
after_setup_theme. Just globalize it before you define it:

global $content_width;
$content_width = 640px;

Regards,
Chip


On Sat, Dec 29, 2012 at 6:38 PM, Shinra Web Holdings <
shinrawebholdings at gmail.com> wrote:

> Except the $content_width variable right? Or is that obsolete now?
> On Dec 29, 2012 2:55 PM, "Otto" <otto at ottodestruct.com> wrote:
>
>> On Sat, Dec 29, 2012 at 2:28 PM, Shinra Web Holdings
>> <contact at shinraholdings.com> wrote:
>> > Is simply placing add_editor_style() in the functions.php file the best
>> > practice, or is it better to wrap it in a theme function and call that
>> with
>> > add_action()?
>>
>> It is best to place that call inside a setup function which is then
>> hooked to the "after_setup_theme" action hook.
>>
>> In general, nothing in the theme's functions.php file should be
>> outside of a function other than the add_action or add_filter calls.
>>
>> -Otto
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20121229/5ead6422/attachment.htm>


More information about the theme-reviewers mailing list