From 2369013c2c958c04ed069e197e43986f90a67777 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Thu, 9 Oct 2008 06:40:30 +0000 Subject: [PATCH] Use "Date" instead of "Modified" when listing drafts and pending posts, since now they have a proper date. git-svn-id: https://develop.svn.wordpress.org/trunk@9110 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 46 ++++++++-------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 7f7cb96289..9411fb0021 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -687,12 +687,7 @@ function wp_manage_posts_columns() { $posts_columns = array(); $posts_columns['cb'] = ''; $posts_columns['title'] = __('Title'); - if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] ) - $posts_columns['modified'] = __('Modified'); - elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] ) - $posts_columns['modified'] = __('Submitted'); - else - $posts_columns['date'] = __('Date'); + $posts_columns['date'] = __('Date'); $posts_columns['author'] = __('Author'); $posts_columns['categories'] = __('Categories'); $posts_columns['tags'] = __('Tags'); @@ -739,16 +734,8 @@ function wp_manage_media_columns() { function wp_manage_pages_columns() { $posts_columns = array(); $posts_columns['cb'] = ''; - $posts_columns['title'] = __('Title'); - - if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] ) - $posts_columns['modified'] = __('Modified'); - elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] ) - $posts_columns['modified'] = __('Submitted'); - else - $posts_columns['date'] = __('Date'); - + $posts_columns['date'] = __('Date'); $posts_columns['author'] = __('Author'); if ( !in_array($post_status, array('pending', 'draft', 'future')) ) $posts_columns['comments'] = '
'; @@ -926,7 +913,6 @@ function inline_edit_row( $type ) { case 'cb': break; - case 'modified': case 'date': if ( ! $bulk ) { ?>
title=""> @@ -1257,20 +1243,14 @@ function _post_row($a_post, $pending_comments, $mode) { post_date && 'date' == $column_name ) { $t_time = $h_time = __('Unpublished'); } else { - if ( 'modified' == $column_name ) { - $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); - $m_time = $post->post_modified; - $time = get_post_modified_time('G', true); - } else { - $t_time = get_the_time(__('Y/m/d g:i:s A')); - $m_time = $post->post_date; - $time = get_post_time('G', true); - } + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $post->post_date; + $time = get_post_time('G', true); + if ( ( abs(time() - $time) ) < 86400 ) { if ( ( 'future' == $post->post_status) ) $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); @@ -1480,20 +1460,14 @@ foreach ($posts_columns as $column_name=>$column_display_name) { post_date && 'date' == $column_name ) { $t_time = $h_time = __('Unpublished'); } else { - if ( 'modified' == $column_name ) { - $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); - $m_time = $page->post_modified; - $time = get_post_modified_time('G', true); - } else { - $t_time = get_the_time(__('Y/m/d g:i:s A')); - $m_time = $page->post_date; - $time = get_post_time('G', true); - } + $t_time = get_the_time(__('Y/m/d g:i:s A')); + $m_time = $page->post_date; + $time = get_post_time('G', true); + if ( ( abs(time() - $time) ) < 86400 ) { if ( ( 'future' == $page->post_status) ) $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );