WordPress.org

Make WordPress Core

Ticket #19674: 19674.diff

File 19674.diff, 803 bytes (added by wonderboymusic, 5 years ago)
  • src/wp-includes/general-template.php

     
    914914         * @param string $sep Document title separator. Default '-'.
    915915         */
    916916        $sep = apply_filters( 'document_title_separator', '-' );
     917        if ( empty( $sep ) ) {
     918                $join = ' ';
     919        } else {
     920                $join = " $sep ";
     921        }
    917922
    918923        /**
    919924         * Filter the parts of the document title.
     
    931936         */
    932937        $title = apply_filters( 'document_title_parts', $title );
    933938
    934         $title = implode( " $sep ", array_filter( $title ) );
     939        $title = implode( $join, array_filter( $title ) );
    935940        $title = wptexturize( $title );
    936941        $title = convert_chars( $title );
    937942        $title = esc_html( $title );