Make WordPress Core


Ignore:
Timestamp:
05/14/2009 02:00:32 AM (16 years ago)
Author:
ryan
Message:

Don't localize dates where not appropriate. Props Denis-de-Bernardy, hakre. fixes #9730

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r11316 r11323  
    354354    global $comment;
    355355    if ( '' == $d )
    356         $date = mysql2date( get_option('date_format'), $comment->comment_date);
     356        $date = mysql2date(get_option('date_format'), $comment->comment_date);
    357357    else
    358358        $date = mysql2date($d, $comment->comment_date);
     
    592592 * @param string $d Optional. The format of the time (defaults to user's config)
    593593 * @param bool $gmt Whether to use the GMT date
     594 * @param bool $translate Whether to translate the time (for use in feeds)
    594595 * @return string The formatted time
    595596 */
    596 function get_comment_time( $d = '', $gmt = false ) {
     597function get_comment_time( $d = '', $gmt = false, $translate = true ) {
    597598    global $comment;
    598599    $comment_date = $gmt? $comment->comment_date_gmt : $comment->comment_date;
    599600    if ( '' == $d )
    600         $date = mysql2date(get_option('time_format'), $comment_date);
     601        $date = mysql2date(get_option('time_format'), $comment_date, $translate);
    601602    else
    602         $date = mysql2date($d, $comment_date);
     603        $date = mysql2date($d, $comment_date, $translate);
    603604    return apply_filters('get_comment_time', $date, $d, $gmt);
    604605}
Note: See TracChangeset for help on using the changeset viewer.