Restore the functionality of date_i18n to pre [17747] so that is works without a provided timestamp again. Fixes #17278.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2011-05-08 17:14:36 +00:00
parent 9a12a7d908
commit da5ca1d1c6
1 changed files with 10 additions and 0 deletions

View File

@ -85,6 +85,16 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
global $wp_locale;
$i = $unixtimestamp;
if ( false === $i ) {
if ( ! $gmt )
$i = current_time( 'timestamp' );
else
$i = time();
// we should not let date() interfere with our
// specially computed timestamp
$gmt = true;
}
// store original value for language with untypical grammars
// see http://core.trac.wordpress.org/ticket/9396
$req_format = $dateformatstring;