#1353 closed defect (bug) (maybelater)
Remove wp_title uses in wordpress.org themes
Reported by: | atimmer | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | General | Keywords: | has-patch |
Cc: |
Description
We should remove wp_title uses from all the wordpress.org themes given that wp_title is now deprecated.
To generate a list of uses of wp_title, you can use this in the meta environment directory:
ag "wp_title[^_]" --ignore="wp-includes" --ignore="twentythirteen" --ignore="twentyfourteen" --ignore="twentyeleven" --ignore="twentytwelve" --ignore="twentyten" --ignore="jetpack" --php
Attachments (4)
Change History (17)
#2
@
9 years ago
I stumbled upon the deprecation warning when working on a local copy of developer.wordpress.org, so at least that one needs to be removed: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php#L10.
I searched the other meta sites and assumed all uses of wp_title should be removed. Am I misinformed here?
#3
@
9 years ago
- Cc bandonrandon@… added
- Keywords needs-refresh has-patch added; needs-patch removed
I started looking into this and found the following meta sites seem to be using the title
- developer.wordpress.org
- learn.wordpress.org
- make.wordpress.org
- apps.wordpress.org
Maybe others.
I did a quick patch for developer.wordpress.org but it may need to be rewritten to account for the various global and separators.
#4
@
9 years ago
Here is a patch for apps.wordpress.org which is a bit simpler as it does not use the $GLOBALS['pagetitle']
It does appear that when switching to title-tag
the front page name is displayed in the title bar when that is not the case when using wp_title()
this may be an issue with the feature as it comes to 4.4 and will be fixed before release.
#12
@
9 years ago
- Keywords needs-refresh removed
- Resolution set to maybelater
- Status changed from new to closed
The deprecation of wp_title()
has been reverted as of [core-35624].
The commits referencing this ticket above have converted all existing meta .org themes away from using wp_title()
except for wporg-forums. I've attached a patch (1353.wporg-forums.diff) that updates the theme in the same fashion as the others. However, it includes a workaround for bbPress (which still only hooks the 'wp_title' filter but not the newer 'document_title_parts' filter). Since the deprecation has been reverted the need to update is not as pressing so it'd be better to hold off updating wporg-forums until bbPress makes a related update (specifically, to filter 'document_title_parts' as an alternative to 'wp_title').
Are there any themes used which don't have the header.php overridden by a child theme which is calling the universal dotorg/header.php file?
I ask because the dotorg/header.php file does not use wp_title().
If the existing themes update, then it won't affect the child themes. Which means this ticket is invalid.