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:
Konstantin Obenland 2014-12-22 10:06:15 +01:00
parent f2d2495630
commit 47ee126fb4
1 changed files with 1 additions and 3 deletions

View File

@ -35,7 +35,7 @@ function _s_body_classes( $classes ) {
} }
add_filter( 'body_class', '_s_body_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. * 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; return $title;
} }
add_filter( 'wp_title', '_s_wp_title', 10, 2 ); 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. * Title shim for sites older than WordPress 4.1.
* *