mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Themes: Improve document title output.
Introduces more flexibility in filtering all parts of the document title,the separator, and a way to short-circuit title generation. Plugins can now also check for theme support and reliably filter the entire output. See #18548. Deprecates `wp_title()`. Fixes #31078. git-svn-id: https://develop.svn.wordpress.org/trunk@35294 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1752,14 +1752,6 @@ function current_theme_supports( $feature ) {
|
||||
if ( !isset( $_wp_theme_features[$feature] ) )
|
||||
return false;
|
||||
|
||||
if ( 'title-tag' == $feature ) {
|
||||
// Don't confirm support unless called internally.
|
||||
$trace = debug_backtrace();
|
||||
if ( ! in_array( $trace[1]['function'], array( '_wp_render_title_tag', 'wp_title' ) ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If no args passed then no extra checks need be performed
|
||||
if ( func_num_args() <= 1 )
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user