From 3d70875d81fd9ddd36ed0bee18b22771c7a1bfca Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 22 Feb 2008 22:38:52 +0000 Subject: [PATCH] Date and title fixes for media management from andy. fixes #5927 git-svn-id: http://svn.automattic.com/wordpress/trunk@6988 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-attachment-rows.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index 0a8fd090a1..e418f5e3b8 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -66,8 +66,8 @@ foreach($posts_columns as $column_name=>$column_display_name) { $t_time = get_the_time(__('Y/m/d g:i:s A')); $m_time = $post->post_date; $time = get_post_time(); - if ( ( abs(time() - $time) ) < 86400 ) { - if ( 'future' == get_post_status($post->ID) ) + if ( ( abs($t_diff = time() - $time) ) < 86400 ) { + if ( $t_diff < 0 ) $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); else $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); @@ -81,9 +81,13 @@ foreach($posts_columns as $column_name=>$column_display_name) { break; case 'parent': - $title = get_the_title($post->post_parent); - if ( empty($title) ) - $title = __('(no title)'); + if ( $post_parent = get_post($post->post_parent) ) { + $title = get_the_title($post->post_parent); + if ( empty($title) ) + $title = __('(no title)'); + } else { + $title = ''; + } ?>