Make WordPress Core

Changeset 35880


Ignore:
Timestamp:
12/12/2015 01:41:24 AM (9 years ago)
Author:
SergeyBiryukov
Message:

I18N: In wp_maybe_decline_date(), bail early if translation functions are not available, e.g. in SHORTINIT mode.

Fixes #34967 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r35667 r35880  
    172172function wp_maybe_decline_date( $date ) {
    173173    global $wp_locale;
     174
     175    // i18n functions are not available in SHORTINIT mode
     176    if ( ! function_exists( '_x' ) ) {
     177        return $date;
     178    }
    174179
    175180    /* translators: If months in your language require a genitive case,
Note: See TracChangeset for help on using the changeset viewer.