From 89e0d7dc9ec52f6de637020159402bb450ec84e1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 12 Dec 2015 01:42:38 +0000 Subject: [PATCH] I18N: In `wp_maybe_decline_date()`, bail early if translation functions are not available, e.g. in `SHORTINIT` mode. Fixes #34967 for trunk. Built from https://develop.svn.wordpress.org/trunk@35880 git-svn-id: http://core.svn.wordpress.org/trunk@35844 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e3fb35317c..b3781639e2 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -172,6 +172,11 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { function wp_maybe_decline_date( $date ) { global $wp_locale; + // i18n functions are not available in SHORTINIT mode + if ( ! function_exists( '_x' ) ) { + return $date; + } + /* translators: If months in your language require a genitive case, * translate this to 'on'. Do not translate into your own language. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index ce7718a65c..3934b6ef2c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35879'; +$wp_version = '4.5-alpha-35880'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.