Making WordPress.org


Ignore:
Timestamp:
01/20/2022 02:06:26 AM (4 years ago)
Author:
dd32
Message:

Trnslate: Set the <title> properly for the old & new header.

Fixes https://github.com/WordPress/wporg-mu-plugins/issues/103

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/helper-functions.php

    r11437 r11456  
    5151}
    5252
    53 add_action( 'after_setup_theme', static function() {
    54     add_theme_support( 'title-tag' );
    55 });
    56 add_action( 'gp_head', '_wp_render_title_tag' );
     53// The new header calls wp_head + gp_head, the old header only calls one or the other, so we must manually add this.
     54if ( ! FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
     55    add_action( 'gp_head', '_wp_render_title_tag' );
     56}
     57
     58/**
     59 * Set the document title to that of GlotPress.
     60 *
     61 * @see https://github.com/GlotPress/GlotPress-WP/issues/8
     62 */
    5763add_filter( 'document_title_parts', static function() {
    5864    return [
Note: See TracChangeset for help on using the changeset viewer.