Make WordPress Core

Changeset 22113


Ignore:
Timestamp:
10/04/2012 06:09:30 PM (12 years ago)
Author:
ryan
Message:

Avoid 'Only variables should be assigned by reference' warning. Props knutsp. fixes #22013

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r21792 r22113  
    6666 */
    6767function translate( $text, $domain = 'default' ) {
    68     $translations = &get_translations_for_domain( $domain );
     68    $translations = get_translations_for_domain( $domain );
    6969    return apply_filters( 'gettext', $translations->translate( $text ), $text, $domain );
    7070}
     
    7979
    8080function translate_with_gettext_context( $text, $context, $domain = 'default' ) {
    81     $translations = &get_translations_for_domain( $domain );
     81    $translations = get_translations_for_domain( $domain );
    8282    return apply_filters( 'gettext_with_context', $translations->translate( $text, $context ), $text, $context, $domain );
    8383}
     
    237237 */
    238238function _n( $single, $plural, $number, $domain = 'default' ) {
    239     $translations = &get_translations_for_domain( $domain );
     239    $translations = get_translations_for_domain( $domain );
    240240    $translation = $translations->translate_plural( $single, $plural, $number );
    241241    return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
     
    250250 */
    251251function _nx($single, $plural, $number, $context, $domain = 'default') {
    252     $translations = &get_translations_for_domain( $domain );
     252    $translations = get_translations_for_domain( $domain );
    253253    $translation = $translations->translate_plural( $single, $plural, $number, $context );
    254254    return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );
Note: See TracChangeset for help on using the changeset viewer.