From 47ee126fb4c8bcf2c7d23a4469524dbcb1993ab9 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Mon, 22 Dec 2014 10:06:15 +0100 Subject: [PATCH] Don't check for a private function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- inc/extras.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inc/extras.php b/inc/extras.php index 06151ba..02bdeea 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -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 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. *