[wp-trac] [WordPress Trac] #18548: Add a better option for <title> tags
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 9 12:30:50 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 joostdevalk):
Replying to [comment:58 F J Kaiser]:
> I still don't get why this is ''really'' needed. Teaching devs is what
codex is for and not the core itself. And if you really want to teach
people directly through template tags, use {{{_doing_it_wrong();}}} and
extend the {{{wp_title();}}} function.
>
> This is the first function I see in core that is a "''parallel''"
function. Normally core has wrapper functions for such stuff. Example:
{{{function wp_title_tag() { echo '<title>'.wp_title( null, false
).'</title>'; }}}}. If you want to add fancy stuff in there: fine. But
actually doubling most part of the ''original'' function makes imo no
sense.
>
> @joostdevalk: You still didn't answer any of my above concerns or
discuss any of the suggestions I made or alternatives I offered. This
gives me the feeling that it's just about "boxing" this through.
Sorry you feel that way but I think you're not getting our points. The
goal is to:
- have a new, better way of doing titles, without messing without causing
issues with all themes that are currently out there. This absolutely,
100%, rules out changing the way `wp_title()` works. You might think that
we should train devs better, but our real concern are users, not devs, who
end up with wonky titles on their blogs because their theme is old and
they don't know how to change it. So backwards compatibility is paramount.
- second, learning from our earlier mistakes, we do not want themes to be
able to change what's in the title in any other way than plugins can, so
we need to make the entire contents of the title tag filterable through 1
filter. The only way of making 100% sure of that is outputting the
`<title>` tags through the code. We can't do that within `wp_title`,
you'll understand why because of the point above.
- finally, we will probably, if this fix goes in, end up deprecating
`wp_title`.
Make sense now? Any concerns I left unanswered?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18548#comment:59>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list