[wp-trac] [WordPress Trac] #18548: Add a better option for <title> tags
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 26 23:54:19 UTC 2011
#18548: Add a better option for <title> tags
------------------------------------------------+--------------------------
Reporter: joostdevalk | Owner: joostdevalk
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Template | Review
Severity: normal | Version: 3.3
Keywords: has-patch dev-feedback needs-codex | Resolution:
------------------------------------------------+--------------------------
Comment (by chipbennett):
Replying to [comment:73 nacin]:
> > The past of least resistance (and fastest adoption) is going to be to
say, "move your wp_title()-filtering code out of header.php, wrap it in a
function in functions.php, and hook it into add_filter( 'wp_title',
'themename_filter_wp_title' )".
>
> I disagree on both counts. This path is more work, without a doubt. Some
of them might not even know what a filter is or how it works.
Most are already aware of filters at this point. The rest would benefit
greatly from learning what a filter is and how to use it. All are
''capable'' of learning.
>
> The new instructions would be: No more template tag, no more wp_title(),
no more messy code in between your <title> tags. Just use
`add_theme_support('title-tag');` and you're done. It's pretty much idiot
proof, and that's the idea.
By all means, correct me if my inference here is incorrect, but IMHO this
sounds like an effort to discourage - if not prevent (as I suspect Plugin
developers would prefer) - Theme developers from modifying the doctitle
content.
For Theme developers that currently modify the output of `wp_title()`, I
think I can safely assume that many would ''still'' want to modify the
doctitle content, even using this new method. So, to say, "''No more
template tag, no more wp_title(), no more messy code in between your
<title> tags. Just use `add_theme_support('title-tag');` and you're
done''" won't be sufficient, because they're left without instructions for
modifying the doctitle content.
And even when `wp_title()` is deprecated, I still don't see the benefit of
introducing a `separate` filter to use. If Theme developers are using the
`wp_title` filter properly by the time `wp_title()` is deprecated, then
that filter would (should) remain sufficient for whatever the new
implementation is.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18548#comment:78>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list