diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
index 9df2bad2c3..32cce280c9 100644
a
|
b
|
foreach ( array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pr |
131 | 131 | add_action( 'init', 'wp_init_targeted_link_rel_filters' ); |
132 | 132 | |
133 | 133 | // Format strings for display. |
134 | | foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) { |
| 134 | foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'document_title', 'widget_title' ) as $filter ) { |
135 | 135 | add_filter( $filter, 'wptexturize' ); |
136 | 136 | add_filter( $filter, 'convert_chars' ); |
137 | 137 | add_filter( $filter, 'esc_html' ); |
138 | 138 | } |
139 | 139 | |
140 | 140 | // Format WordPress. |
141 | | foreach ( array( 'the_content', 'the_title', 'wp_title' ) as $filter ) { |
| 141 | foreach ( array( 'the_content', 'the_title', 'wp_title', 'document_title' ) as $filter ) { |
142 | 142 | add_filter( $filter, 'capital_P_dangit', 11 ); |
143 | 143 | } |
144 | 144 | add_filter( 'comment_text', 'capital_P_dangit', 31 ); |
diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 5c2692d7a3..c753d721e9 100644
a
|
b
|
function wp_get_document_title() { |
1237 | 1237 | $title = apply_filters( 'document_title_parts', $title ); |
1238 | 1238 | |
1239 | 1239 | $title = implode( " $sep ", array_filter( $title ) ); |
1240 | | $title = wptexturize( $title ); |
1241 | | $title = convert_chars( $title ); |
1242 | | $title = esc_html( $title ); |
1243 | | $title = capital_P_dangit( $title ); |
| 1240 | |
| 1241 | /** |
| 1242 | * Filters the document title. |
| 1243 | * |
| 1244 | * @since 5.8.0 |
| 1245 | * |
| 1246 | * @param string $title Document title. |
| 1247 | */ |
| 1248 | $title = apply_filters( 'document_title', $title ); |
1244 | 1249 | |
1245 | 1250 | return $title; |
1246 | 1251 | } |