From af4c2613d4d253b4e517ef36af925c8a17c728ab Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 18 Feb 2008 22:07:57 +0000 Subject: [PATCH] Move timestamp to submitbox. Put it in a slidedown. see #5846 git-svn-id: https://develop.svn.wordpress.org/trunk@6904 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-form-advanced.php | 38 ++++++++++++++++----------------- wp-admin/edit-page-form.php | 32 ++++++++++++++++----------- wp-admin/includes/template.php | 9 +------- wp-admin/js/page.js | 9 ++++++++ wp-admin/js/post.js | 9 ++++++++ 5 files changed, 58 insertions(+), 39 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index bcb529295e..174a1be027 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -127,22 +127,29 @@ addLoadEvent(focusit);

post_status ) { - $time = __('Scheduled for:
%1$s at %2$s'); - $date = $post->post_date; -} else if ( 'publish' == $post->post_status ) { - $time = __('Published on:
%1$s at %2$s'); - $date = $post->post_date; + if ( 'future' == $post->post_status ) { + $stamp = __('Scheduled for:
%1$s at %2$s'); + } else if ( 'publish' == $post->post_status ) { + $stamp = __('Published on:
%1$s at %2$s'); + } else { + $stamp = __('Saved on:
%1$s at %2$s'); + } + + $date = mysql2date(get_option('date_format'), $post->post_date); + $time = mysql2date(get_option('time_format'), $post->post_date); } else { - $time = __('Saved on:
%1$s at %2$s'); - $date = $post->post_modified; + $stamp = __('Timestamp:
%1$s at %2$s'); + $date = mysql2date(get_option('date_format'), current_time('mysql')); + $time = mysql2date(get_option('time_format'), current_time('mysql')); } - ?> -

- +

+ +
+

@@ -316,13 +323,6 @@ list_meta($metadata); - -

-

-
-
- - id ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 4ee124c316..c8a668d255 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -91,22 +91,30 @@ addLoadEvent(focusit);

post_status ) { - $time = __('Scheduled for:
%1$s at %2$s'); - $date = $post->post_date; -} else if ( 'publish' == $post->post_status ) { - $time = __('Published on:
%1$s at %2$s'); - $date = $post->post_date; +if ($post_ID) { + + if ( 'future' == $post->post_status ) { + $stamp = __('Scheduled for:
%1$s at %2$s'); + } else if ( 'publish' == $post->post_status ) { + $stamp = __('Published on:
%1$s at %2$s'); + } else { + $stamp = __('Saved on:
%1$s at %2$s'); + } + + $date = mysql2date(get_option('date_format'), $post->post_date); + $time = mysql2date(get_option('time_format'), $post->post_date); } else { - $time = __('Saved on:
%1$s at %2$s'); - $date = $post->post_modified; + $stamp = __('Timestamp:
%1$s at %2$s'); + $date = mysql2date(get_option('date_format'), current_time('mysql')); + $time = mysql2date(get_option('time_format'), current_time('mysql')); } - ?> -

- +

+ +
+

diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9d3070f337..88de2845b6 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -754,7 +754,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { if ( (int) $tab_index > 0 ) $tab_index_attribute = " tabindex=\"$tab_index\""; - echo '

'; + echo ' '; $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); $post_date = ($for_post) ? $post->post_date : $comment->comment_date; @@ -780,13 +780,6 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { /> get_month( $mm ), $jj, $aa, $hh, $mn ); - } -?> -
-