Make WordPress Core

Ticket #5774: 5774.diff

File 5774.diff, 1.4 KB (added by DD32, 17 years ago)

Uses post_modified if post_date is 0000..

  • wp-admin/edit-form-advanced.php

     
    133133        $time = __('Published on:<br />%1$s at %2$s');
    134134else
    135135        $time = __('Saved on:<br />%1$s at %2$s');
     136       
     137$date = ($post->post_date != '0000-00-00 00:00:00') ? $post->post_date : $post->post_modified;
     138
    136139?>
    137 <p><?php printf($time, mysql2date(get_option('date_format'), $post->post_date), mysql2date(get_option('time_format'), $post->post_date)); ?>
     140<p><?php printf($time, mysql2date(get_option('date_format'), $date), mysql2date(get_option('time_format'), $date)); ?>
    138141<?php endif; ?>
    139142</div>
    140143
  • wp-admin/edit-page-form.php

     
    9898        $time = __('Published on:<br />%1$s at %2$s');
    9999else
    100100        $time = __('Saved on:<br />%1$s at %2$s');
     101
     102$date = ($post->post_date != '0000-00-00 00:00:00') ? $post->post_date : $post->post_modified;
     103
    101104?>
    102 <p><?php printf($time, mysql2date(get_option('date_format'), $post->post_date), mysql2date(get_option('time_format'), $post->post_date)); ?>
     105<p><?php printf($time, mysql2date(get_option('date_format'), $date), mysql2date(get_option('time_format'), $date)); ?>
    103106<?php endif; ?>
    104107</div>
    105108