Changes between Initial Version and Version 1 of Ticket #51643, comment 1
- Timestamp:
- 02/27/2021 01:36:28 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51643, comment 1
initial v1 1 1 It does seem odd that `wptexturize()`, `convert_chars()`, and `capital_P_dangit()` are all run on the title after the `document_title_parts` filter is applied in `wp_document_title()`. 2 2 3 I'm not sure if we can adjust the order now that it's been there for a few years, but it looks like there's room for a `document_title` filter that is applied before `wp_document_title()` returns `$title`. We can then use the familiar pattern (` general-template.php`) to apply each of those in a way that can be unhooked.3 I'm not sure if we can adjust the order now that it's been there for a few years, but it looks like there's room for a `document_title` filter that is applied before `wp_document_title()` returns `$title`. We can then use the familiar pattern (`default-filters.php`) to apply each of those in a way that can be unhooked. 4 4 5 5 Because `wp_document_title()` is expected to return a string safe for use in `<title></title>`, `esc_html()` should probably be run after the `document_title` filter is applied.