From 4f0bb966025f01497779efe093f2a9df5b29a32d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 13 Nov 2013 03:55:33 +0000 Subject: [PATCH] Use a simple replacement for 'wp_title' filter in capital_P_dangit(), like we do for 'the_title'. props nacin. fixes #25796. git-svn-id: https://develop.svn.wordpress.org/trunk@26122 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/formatting.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index eaa12de7f6..c120b61334 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -3339,7 +3339,8 @@ function wp_basename( $path, $suffix = '' ) { */ function capital_P_dangit( $text ) { // Simple replacement for titles - if ( 'the_title' === current_filter() ) + $current_filter = current_filter(); + if ( 'the_title' === $current_filter || 'wp_title' === $current_filter ) return str_replace( 'Wordpress', 'WordPress', $text ); // Still here? Use the more judicious replacement static $dblq = false;