Restore the functionality of date_i18n to pre [17747] so that is works without a provided timestamp again. Fixes #17278.
git-svn-id: https://develop.svn.wordpress.org/trunk@17841 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f9eb2a0ed4
commit
e766d629b8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user