[wp-trac] [WordPress Trac] #31078: Continue the better option for <title> tags
WordPress Trac
noreply at wordpress.org
Tue Sep 22 15:40:32 UTC 2015
#31078: Continue the better option for <title> tags
-------------------------------------+-----------------------
Reporter: obenland | Owner: obenland
Type: enhancement | Status: accepted
Priority: normal | Milestone: 4.4
Component: Themes | Version: 4.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+-----------------------
Changes (by obenland):
* keywords: has-patch needs-testing dev-feedback => has-patch needs-
testing
Comment:
Replying to [comment:19 nacin]:
Thanks so much for your feedback!
> Translating `F` will not end up with a translated month name. You'll end
up with `F`, which will then only turn into a translated month name when
PHP is operating under a different locale.
Yes, we'd assume that PHP *is* operating under a different locale. There
are a number of instances where we already make that assumption, namely in
`get_the_archive_title()`.
> * Where did the `wp_title` filter go? Is there any reason for it to
vanish?
One of the main reasons for doing this API change in the first place was
that the `wp_title` is unreliable for plugins because it doesn't
necessarily allow for filtering the entire document title. I thought it'd
make sense to let it die together with `wp_title()` and continue with a
clean slate.
> * I like the associative array `$title` used to build the parts.
However, there are some confusing pieces.
Your suggestions make sense, especially the revised key names. In my
upcoming patch I ended up with
`$parts['title']`, `$parts['site']` (if not home page),
`$parts['tagline']` (if home page), `$parts['page']` (if paged).
That way `'title'` is constant, which is probably what is most important
in that context.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31078#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list