[buddypress-trac] [BuddyPress Trac] #6107: Missing site titles for BP pages in Twenty Fifteen and new themes which add support to the new title-tag feature

buddypress-trac noreply at wordpress.org
Fri Mar 6 23:19:07 UTC 2015


#6107: Missing site titles for BP pages in Twenty Fifteen and new themes which add
support to the new title-tag feature
------------------------------+-----------------------
 Reporter:  mercime           |       Owner:  hnla
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  2.2.2
Component:  Component - Core  |     Version:
 Severity:  major             |  Resolution:
 Keywords:  has-patch         |
------------------------------+-----------------------

Comment (by johnjamesjacoby):

 Here is (one reason) why this is a big problem:

 * Since WordPress 4.1, themes that support the `title-tag` feature will
 automatically include the blog name, plus the description on the home page
 and pagination on paginated results.
 * [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentyten/header.php#L15 TwentyTen] does not filter
 `wp_title` directly, and instead has the above additions hard-coded.
 * [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentyeleven/header.php#L27 TwentyEleven] does not filter
 `wp_title` directly, and instead has the above additions hard-coded.
 * [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentytwelve/functions.php#L185 TwentyTwelve] filters
 `wp_title` and adds the above additions via a filter at priority 10.
 * [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentythirteen/functions.php#L190 TwentyThirteen] filters
 `wp_title` and adds the above additions via a filter at priority 10.
 * [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentyfourteen/functions.php#L464 TwentyFourteen] filters
 `wp_title` and adds the above additions via a filter at priority 10.
 * [https://core.trac.wordpress.org/browser/trunk/src/wp-
 content/themes/twentyfifteen/functions.php#L73 TwentyFifteen] supports the
 `title-tag` feature, which means by the time we filter `wp_title` the
 above additions have been made by WordPress core.
 *
 [https://github.com/Automattic/_s/commit/83792b8566eaec7c32d1500dad99644b3ca7d17b
 #diff-78cd5aa3783a74555c9938a2a81d01c6 Underscores] just switched to using
 `title-tag` which means all previous derivatives will be filtering
 `wp_title` and all future ones will be using `title-tag`.

 There are 3 permutations in core themes, and I think we can safely assume
 any other themes will be using all of these approaches for years to come,
 and I have a hunch the number of Underscores forks out there is probably
 pretty high.

 I'm confident my patch considers all of these permutations, but less
 confident it actually fixes issues with Yoast's SEO plugin, or any other
 plugin goofing around with `wp_title`. Like Boone said, I agree that we
 should probably own the `<title>` contents for our own pages, and any
 plugins wanting to improve them should do so purposely, and in such a way
 that accidentally breaking them is not possible without doing something
 egregious.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6107#comment:34>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list