From 3c09c184f3863f3fef48e1d5614fa7de6b677f08 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 4 Oct 2012 18:09:30 +0000 Subject: [PATCH] Avoid 'Only variables should be assigned by reference' warning. Props knutsp. fixes #22013 git-svn-id: http://core.svn.wordpress.org/trunk@22113 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 77d9790b92..4062339acd 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -65,7 +65,7 @@ function get_locale() { * @return string Translated text */ function translate( $text, $domain = 'default' ) { - $translations = &get_translations_for_domain( $domain ); + $translations = get_translations_for_domain( $domain ); return apply_filters( 'gettext', $translations->translate( $text ), $text, $domain ); } @@ -78,7 +78,7 @@ function before_last_bar( $string ) { } function translate_with_gettext_context( $text, $context, $domain = 'default' ) { - $translations = &get_translations_for_domain( $domain ); + $translations = get_translations_for_domain( $domain ); return apply_filters( 'gettext_with_context', $translations->translate( $text, $context ), $text, $context, $domain ); } @@ -236,7 +236,7 @@ function esc_html_x( $single, $context, $domain = 'default' ) { * @return string Either $single or $plural translated text */ function _n( $single, $plural, $number, $domain = 'default' ) { - $translations = &get_translations_for_domain( $domain ); + $translations = get_translations_for_domain( $domain ); $translation = $translations->translate_plural( $single, $plural, $number ); return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain ); } @@ -249,7 +249,7 @@ function _n( $single, $plural, $number, $domain = 'default' ) { * */ function _nx($single, $plural, $number, $context, $domain = 'default') { - $translations = &get_translations_for_domain( $domain ); + $translations = get_translations_for_domain( $domain ); $translation = $translations->translate_plural( $single, $plural, $number, $context ); return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain ); }