<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[11431] sites/trunk/wordpress.org/public_html/wp-content: Themes: Convert WordPress.org themes to use `add_theme_supprt( 'title-tag' );` rather than a private global.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/11431">11431</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/11431","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>dd32</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2022-01-12 07:19:37 +0000 (Wed, 12 Jan 2022)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Themes: Convert WordPress.org themes to use `add_theme_supprt( 'title-tag' );` rather than a private global.
See https://github.com/WordPress/wporg-mu-plugins/issues/44</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubgutenbergheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgbreathefunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgbreatheheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporglearn2020functionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmakehomefunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmakehomeheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgopenverseheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgp2headerphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpluginsfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpluginsheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgshowcasefunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgshowcaseheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgsupportfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentmupluginspubsitebrandingphp">sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/site-branding.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentmupluginspubsitebrandingphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/site-branding.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/site-branding.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/site-branding.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,50 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace WordPressdotorg\MU_Plugins\Site_Branding;
+/**
+ * Plugin Name: WordPress.org Site Branding
+ * Description: Ensures that <title> tags on WordPress.org always include WordPress.
+ */
+
+add_filter( 'document_title_parts', __NAMESPACE__ . '\document_title_parts', 100 );
+function document_title_parts( $parts ) {
+ // In some places on WordPress.org the document title is used within the theme, don't affect title calls after the </head>.
+ if ( did_action( 'wp_body_open' ) ) {
+ return $parts;
+ }
+
+ $combined = implode( ' ', $parts );
+
+ // Ensure that 'WordPress' is present in the title of the URL
+ if ( false === strpos( $combined, 'WordPress' ) ) {
+ $parts['wporg-suffix'] = get_wordpress_brand();
+ }
+
+ return $parts;
+}
+
+add_filter( 'bbp_title', __NAMESPACE__ . '\bbp_title', 100 );
+function bbp_title( $title ) {
+ return $title . get_wordpress_brand();
+}
+
+/**
+ * Return the 'Brand' of the WordPress.org site.
+ *
+ * This is "WordPress.org" or a localised variant such as "WordPress Deutch".
+ */
+function get_wordpress_brand() {
+ global $rosetta;
+
+ if ( ! isset( $rosetta ) ) {
+ return 'WordPress.org';
+ }
+
+ $root_id = $rosetta->get_root_site_id();
+ $name = get_blog_option( $root_id, 'blogname' );
+
+ if ( false !== strpos( $name, 'WordPress' ) ) {
+ return $name;
+ }
+
+ return "WordPress.org $name";
+}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/site-branding.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubgutenbergheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,7 +8,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @package Gutenbergtheme
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> require WPORGPATH . 'header.php';
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgbreathefunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,6 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function after_setup_theme() {
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'responsive-embeds' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_theme_support( 'title-tag' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> remove_theme_support( 'custom-header' );
</span><span class="cx" style="display: block; padding: 0 10px"> remove_theme_support( 'custom-background' );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgbreatheheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,6 +161,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'automatic-feed-links' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'post-thumbnails' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_theme_support( 'title-tag' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Modify default breadcrumbs.
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'breadcrumb_trail_items', __NAMESPACE__ . '\\breadcrumb_trail_items_for_hooks', 10, 2 );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgdeveloperheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> require WPORGPATH . 'header.php';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporglearn2020functionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,7 +85,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @package WPBBP
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wporg_get_global_header() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_title( '|', false, 'right' ) . __( 'Learn WordPress', 'wporg-learn' );
</del><span class="cx" style="display: block; padding: 0 10px"> require WPORGPATH . 'header.php';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmakehomefunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,6 +10,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function make_setup_theme() {
</span><span class="cx" style="display: block; padding: 0 10px"> register_nav_menu( 'primary', __( 'Navigation Menu', 'make-wporg' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'post-thumbnails' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_theme_support( 'title-tag' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'pre_get_posts', 'make_query_mods' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,17 +46,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Omit page name from front page title.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Set page name for front page title.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $parts The document title parts.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array The document title parts.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function make_remove_frontpage_name_from_title( $parts ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function make_add_frontpage_name_to_title( $parts ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_front_page() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $parts['title'] = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $parts['title'] = 'Get Involved';
+ $parts['site'] = 'WordPress.org';
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $parts;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-add_filter( 'document_title_parts', 'make_remove_frontpage_name_from_title' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+add_filter( 'document_title_parts', 'make_add_frontpage_name_to_title' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmakehomeheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !isset( $wporg_global_header_options['in_wrapper'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgopenverseheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-openverse/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,7 +14,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgp2headerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-global $pagetitle;
-$pagetitle = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> require WPORGPATH . 'header.php';
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="headline">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> use const WordPressdotorg\Pattern_Directory\Pattern_Post_Type\POST_TYPE;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpluginsfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,6 +24,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Add default posts and comments RSS feed links to head.
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'automatic-feed-links' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Add support for WordPress generated <title> tags.
+ add_theme_support( 'title-tag' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Don't include Adjacent Posts functionality.
</span><span class="cx" style="display: block; padding: 0 10px"> remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpluginsheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,7 +20,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgshowcasefunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,6 +3,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Add support for adding feed links to head.
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'automatic-feed-links' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// Add support for title tags.
+add_theme_support( 'title-tag' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Disable comments feed.
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'feed_links_show_comments_feed', '__return_false' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -261,7 +264,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wporg_showcase_document_title( $parts ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // wp_get_document_title() is used by the theme in breadcrumb(), whereby it
</span><span class="cx" style="display: block; padding: 0 10px"> // only really needs the title.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( did_action( 'wp_head' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( did_action( 'wp_body_open' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return array( 'title' => $parts['title'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgshowcaseheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgsupportfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,6 +16,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wporg_support_theme_support() {
</span><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'html5', array( 'comment-form' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_theme_support( 'title-tag' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'after_setup_theme', 'wporg_support_theme_support' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -269,15 +270,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @package WPBBP
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wporg_get_global_header() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- $GLOBALS['pagetitle'] = wp_title( '|', false, 'right' );
- // Suffix either "WordPress.org $LOCALE" or WordPress.org.
- if ( isset( $GLOBALS['wporg_global_header_options']['rosetta_title'] ) ) {
- $GLOBALS['pagetitle'] .= $GLOBALS['wporg_global_header_options']['rosetta_title'];
- } else {
- $GLOBALS['pagetitle'] .= __( 'WordPress.org', 'wporg-forums' );
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> require WPORGPATH . 'header.php';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -291,6 +283,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bbp_raw_title', 'wporg_support_bbp_raw_title' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Add bbPress titles to the document title.
+ *
+ * bbPress doesn't support `title-tag` theme support, instead relying upon `wp_title` filters instead.
+ */
+function wporg_support_pre_get_document_title( $title ) {
+ // See wp_get_document_title()
+ $sep = apply_filters( 'document_title_separator', '|' );
+
+ return bbp_title( $title, $sep, 'right' );
+}
+add_filter( 'pre_get_document_title', 'wporg_support_pre_get_document_title' );
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * The Footer for our theme.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @package WPBBP
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,6 +22,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_theme_support( 'title-tag' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // No need for canonical lookups
</span><span class="cx" style="display: block; padding: 0 10px"> remove_action( 'template_redirect', 'redirect_canonical' );
</span><span class="cx" style="display: block; padding: 0 10px"> remove_action( 'template_redirect', 'wp_old_slug_redirect' );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php 2022-01-12 01:34:03 UTC (rev 11430)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php 2022-01-12 07:19:37 UTC (rev 11431)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,7 +8,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo do_blocks( '<!-- wp:wporg/global-header /-->' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $GLOBALS['pagetitle'] = wp_get_document_title();
</del><span class="cx" style="display: block; padding: 0 10px"> global $wporg_global_header_options;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $wporg_global_header_options['in_wrapper'] = '';
</span></span></pre>
</div>
</div>
</body>
</html>