[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 10:23:47 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 imath):
> That being said, just from a readability point of view: using argument
overloading in bp_modify_page_title(), and using the same function for
both filters, makes the logic a bit hard to follow. Could we convert to
having two separate callbacks - one for 'wp_title' and one for
'wp_title_parts' - and each would be a wrapper for the central logic of
bp_modify_page_title()?
My first idea was to stop using the 'wp_title' filter to let WordPress
build the title for us using the 'wp_title_parts' filter instead, it
appears it's not yet a good idea, because :
1. 'wp_title_parts' was introduced in 4.0 and we support back to 3.6
2. using a "mix" of both filters where we would use 'wp_title_parts' for
the sites using WP > 4.0 , and eventually fallback to 'wp_title' for the
sites using 3.6 < WP < 4.0, as @boonebgorges said, is confusing and hard
to follow
3. There are plugins that are filtering 'wp_title' without taking in
account the filter BuddyPress is providing for its "pages" (in particular
Yoast). This means our efforts to respect the WordPress way of building
title using the 'wp_title_parts' filter would anyway & inevitably be
cancelled by these plugins.
So 6170.04.patch is simplifying everything as it carries on filtering
'wp_title', changing the priority to '''20'''. I think we can act this
late because we are taking care of checking the page that is loading is a
BuddyPress page.
I've tested it with twentyfifteen (which supports the title-tag feature) &
twentytwelve (which is not supporting it and uses
`twentytwelve_wp_title()` to filter 'wp_title') on WordPress trunk.
Then i've switched to 4.0 branch and tested twentytwelve again.
Patch seems to fix the issue and i have good hope, it will also be the
case, when a plugin is filtering 'wp_title' before 20.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6107#comment:26>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list