WordPress.org

Make WordPress Core

Changeset 17841


Ignore:
Timestamp:
05/08/2011 05:14:36 PM (7 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

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

    r17826 r17841  
    8585    global $wp_locale;
    8686    $i = $unixtimestamp;
     87
     88    if ( false === $i ) {
     89        if ( ! $gmt )
     90            $i = current_time( 'timestamp' );
     91        else
     92            $i = time();
     93        // we should not let date() interfere with our
     94        // specially computed timestamp
     95        $gmt = true;
     96    }
    8797
    8898    // store original value for language with untypical grammars
Note: See TracChangeset for help on using the changeset viewer.