From 5deeece50b2f5dc09f856734fa9461f2c78a2367 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 9 Feb 2008 08:40:00 +0000 Subject: [PATCH] Fix display of dates for drafts and future posts. Props DD32 and ffemtcj. see #5774 git-svn-id: https://develop.svn.wordpress.org/trunk@6768 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-form-advanced.php | 13 +++++++++---- wp-admin/edit-page-form.php | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 8157836cd1..80cffd8dd6 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -128,14 +128,19 @@ addLoadEvent(focusit); post_status ) +if ( 'future' == $post->post_status ) { $time = __('Scheduled for:
%1$s at %2$s'); -else if ( 'publish' == $post->post_status ) + $date = $post->post_date; +} else if ( 'publish' == $post->post_status ) { $time = __('Published on:
%1$s at %2$s'); -else + $date = $post->post_date; +} else { $time = __('Saved on:
%1$s at %2$s'); + $date = $post->post_modified; +} + ?> -

post_date), mysql2date(get_option('time_format'), $post->post_date)); ?> +

diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index cada0c0f89..64612344cb 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -93,14 +93,19 @@ addLoadEvent(focusit); post_status ) +if ( 'future' == $post->post_status ) { $time = __('Scheduled for:
%1$s at %2$s'); -else if ( 'publish' == $post->post_status ) + $date = $post->post_date; +} else if ( 'publish' == $post->post_status ) { $time = __('Published on:
%1$s at %2$s'); -else + $date = $post->post_date; +} else { $time = __('Saved on:
%1$s at %2$s'); + $date = $post->post_modified; +} + ?> -

post_date), mysql2date(get_option('time_format'), $post->post_date)); ?> +