forked from mirror/_s
Don't check for a private function.
Even with WordPress’ commitment to backwards compatibility, we should probably not bank on private functions being around for ever, and tying our functionality to it. This will go old school and do a version check to provide compatibility with older versions of WordPress. Again, this is only temporary until 4.3 is out. See #644. Fixes #636.
This commit is contained in:
parent
f2d2495630
commit
47ee126fb4
|
@ -35,7 +35,7 @@ function _s_body_classes( $classes ) {
|
|||
}
|
||||
add_filter( 'body_class', '_s_body_classes' );
|
||||
|
||||
if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
||||
if ( version_compare( $GLOBALS['wp_version'], '4.1', '<' ) ) :
|
||||
/**
|
||||
* Filters wp_title to print a neat <title> tag based on what is being viewed.
|
||||
*
|
||||
|
@ -67,9 +67,7 @@ if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
|||
return $title;
|
||||
}
|
||||
add_filter( 'wp_title', '_s_wp_title', 10, 2 );
|
||||
endif;
|
||||
|
||||
if ( ! function_exists( '_wp_render_title_tag' ) ) :
|
||||
/**
|
||||
* Title shim for sites older than WordPress 4.1.
|
||||
*
|
||||
|
|
Reference in New Issue