Make WordPress Core

Ticket #51643: 51643.1.diff

File 51643.1.diff, 1.8 KB (added by audrasjb, 4 years ago)
  • src/wp-includes/default-filters.php

    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 
    131131add_action( 'init', 'wp_init_targeted_link_rel_filters' );
    132132
    133133// Format strings for display.
    134 foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) {
     134foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'document_title', 'widget_title' ) as $filter ) {
    135135        add_filter( $filter, 'wptexturize' );
    136136        add_filter( $filter, 'convert_chars' );
    137137        add_filter( $filter, 'esc_html' );
    138138}
    139139
    140140// Format WordPress.
    141 foreach ( array( 'the_content', 'the_title', 'wp_title' ) as $filter ) {
     141foreach ( array( 'the_content', 'the_title', 'wp_title', 'document_title' ) as $filter ) {
    142142        add_filter( $filter, 'capital_P_dangit', 11 );
    143143}
    144144add_filter( 'comment_text', 'capital_P_dangit', 31 );
  • src/wp-includes/general-template.php

    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() { 
    12371237        $title = apply_filters( 'document_title_parts', $title );
    12381238
    12391239        $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 );
    12441249
    12451250        return $title;
    12461251}