From 28f85666302fd0e93488bdad910f2ff44ea77221 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 8 Dec 2014 16:05:34 +0000 Subject: [PATCH] Improve the `doing_it_wrong()` text for `title-tag` theme support. Props ocean90 Fixes #18548 git-svn-id: https://develop.svn.wordpress.org/trunk@30787 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index d31dbf7f58..f8539e9f8f 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -1615,7 +1615,9 @@ function add_theme_support( $feature ) { case 'title-tag' : // Can be called in functions.php but must happen before wp_loaded, i.e. not in header.php. if ( did_action( 'wp_loaded' ) ) { - _doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( _x( 'You need to add theme support before %s.', 'action name' ), 'wp_loaded' ), '4.1.0' ); + /* translators: 1: Theme support 2: hook name */ + _doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( __( 'Theme support for %1$s should be registered before the %2$s hook.' ), + 'title-tag', 'wp_loaded' ), '4.1' ); return false; }