Make WordPress Core

Ticket #1107: datemodified.diff

File datemodified.diff, 1.0 KB (added by mdawaffe, 19 years ago)
  • wp-includes/template-functions-general.php

     
    582582    //echo ""+$post->post_date;
    583583}
    584584
    585 function the_date($d='', $before='', $after='', $echo = true) {
     585function the_date($d='', $before='', $after='', $echo = true, $date_type = '') {
    586586    global $id, $post, $day, $previousday, $newday;
    587587    $the_date = '';
    588588    if ($day != $previousday) {
    589589        $the_date .= $before;
     590        $which_date = ( 'modified' == $date_type ) ? $post->post_modified : $post->post_date;
    590591        if ($d=='') {
    591             $the_date .= mysql2date(get_settings('date_format'), $post->post_date);
     592            $the_date .= mysql2date(get_settings('date_format'), $which_date);
    592593        } else {
    593             $the_date .= mysql2date($d, $post->post_date);
     594            $the_date .= mysql2date($d, $which_date);
    594595        }
    595596        $the_date .= $after;
    596597        $previousday = $day;