You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2025. It is now read-only.
On one of the articles in theThemeShaper WordPress Theme Tutorial: 2nd Edition Series, which uses code based on _s, it's been suggested in the comments that $content_width should be moved inside _s_setup().
Here is the reason given in the comments (by Justin Tadlock):
"This makes sure that it’s easy for child themes to know exactly what point to overwrite it. It also allows you to get rid of the isset() check."
(I'm aware that _s is not intended to be a parent theme, though.)
Chip Bennett commented:
"We (the Theme Review Team) have been trying to move developers more toward putting everything in functions.php inside callbacks. Is there any advantage/disadvantage in doing so with $content_width?"