[wp-trac] [WordPress Trac] #21256: New theme feature - add_theme_support( 'content-width', $defaults )
WordPress Trac
noreply at wordpress.org
Tue Feb 26 23:52:24 UTC 2013
#21256: New theme feature - add_theme_support( 'content-width', $defaults )
--------------------------------------+------------------------------
Reporter: ramiy | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.4.1
Severity: normal | Resolution:
Keywords: dev-feedback 2nd-opinion |
--------------------------------------+------------------------------
Comment (by maor):
Replying to [comment:25 nacin]:
> It just seems the whole idea of $content_width needs a re-think.
I can totally relate to that.
Like it was noted before, I also feel that the "issue" here is that
`content_width` lacks context. While I don't like the way of changing
`content_width` on the fly, there is really not an easier way to do that
other than hooking into `template_redirect` (at least for the time being).
Just throwing out an idea: what if it was possible to set `content_width`
for any template file (either a "template" or theme file such as page.php,
single.php, etc), by having this new line in the file headers.
{{{
<?php
/**
* Template Name: Sidebar Template
* Description: A Page Template that adds a sidebar to pages
* Content Width: 550
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
}}}
It's not perfect. What might be good about this is that we do have
context. The downside is when a dashboard operation is taking place --
there is no easy way to know which content-width setting is the right one.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21256#comment:27>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list