[wp-trac] [WordPress Trac] #51643: Function capital_P_dangit is applied directly to document title
WordPress Trac
noreply at wordpress.org
Tue May 25 23:42:29 UTC 2021
#51643: Function capital_P_dangit is applied directly to document title
--------------------------------------+----------------------
Reporter: dragunoff | Owner: desrosj
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.8
Component: Formatting | Version:
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+----------------------
Changes (by desrosj):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"51019" 51019]:
{{{
#!CommitTicketReference repository="" revision="51019"
Formatting: Introduce the `document_title` filter.
In `wp_get_document_title(), the returned value is currently passed
directly through `wptexturize()`, `convert_chars()`, and
`capital_P_dangit()`, and is done so after the `document_title_parts`
filter is run.
This makes it impossible to fully control the output of
`wp_get_document_title()` and is inconsistent with how other similar text
is processed with these functions.
This commit introduces the `document_title` filter, which is run
immediately before returning the results of the `wp_get_document_title()`
function and moves the three formatting functions mentioned above to the
new filter hook. This allows developers to further modify the title after
being prepared by WordPress, or to modify the functions hooked to this
filter as they wish.
Props dragunoff, jeremyfelt, paaggeli, audrasjb.
Fixes #51643.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51643#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list