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

Merges [35880] to the 4.4 branch.
Props SergeyBiryukov.
Fixes #34967.

Built from https://develop.svn.wordpress.org/branches/4.4@36063


git-svn-id: http://core.svn.wordpress.org/branches/4.4@36028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-12-23 01:39:28 +00:00
parent 9f78d3f9c3
commit 70d9869e38
2 changed files with 6 additions and 1 deletions

View File

@ -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.
*/

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4.1-alpha-36060';
$wp_version = '4.4.1-alpha-36063';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.