WordPress.org

Making WordPress.org

Ticket #4898: 4898.diff

File 4898.diff, 932 bytes (added by diddledan, 13 months ago)

Add title separator and site name after title on Gutenberg pages

  • wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    diff --git wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php
    index c7e9f3978..9d6e94ca8 100644
    add_action( 'template_redirect', function() { 
    631631        add_filter( 'wp_headers', 'disable_x_pingback' );
    632632
    633633        function frontenberg_site_title() {
    634                 return esc_html__( 'The new Gutenberg editing experience', 'wporg' );
     634                $sep = apply_filters( 'document_title_separator', '-' );
     635
     636                $title  = esc_html__( 'The new Gutenberg editing experience', 'wporg' );
     637                $suffix = esc_html( " $sep " . get_bloginfo( 'name', 'display' ) );
     638
     639                return $title . $suffix;
    635640        }
    636641        add_filter( 'the_title', 'frontenberg_site_title' );
    637642        add_filter( 'option_blogname', 'frontenberg_site_title' );