Time tweak. Closes #182.

This commit is contained in:
Mike Jolley 2011-11-11 13:09:01 +00:00
parent e18d8bdf70
commit 7cd7f4c201
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ function woocommerce_order_notes_meta_box() {
if ($customer_note) echo 'customer-note';
echo '"><div class="note_content">';
echo wpautop(wptexturize($note->comment_content));
echo '</div><p class="meta">'. sprintf(__('added %s ago', 'woothemes'), human_time_diff(strtotime($note->comment_date))) .' - <a href="#" class="delete_note">'.__('Delete note', 'woothemes').'</a></p>';
echo '</div><p class="meta">'. sprintf(__('added %s ago', 'woothemes'), human_time_diff(strtotime($note->comment_date), current_time('timestamp'))) .' - <a href="#" class="delete_note">'.__('Delete note', 'woothemes').'</a></p>';
echo '</li>';
endforeach;
else :

View File

@ -40,7 +40,7 @@ function woocommerce_order_tracking( $atts ) {
$order_status_text = sprintf( __('Order #%s which was made %s has the status &ldquo;%s&rdquo;', 'woothemes'), $order->id, human_time_diff(strtotime($order->order_date), current_time('timestamp')).__(' ago', 'woothemes'), $status->name );
if ($order->status == 'completed') $order_status_text .= ' ' . __('and was completed', 'woothemes') . ' ' . human_time_diff(strtotime($order->completed_date)).__(' ago', 'woothemes');
if ($order->status == 'completed') $order_status_text .= ' ' . __('and was completed', 'woothemes') . ' ' . human_time_diff(strtotime($order->completed_date), current_time('timestamp')).__(' ago', 'woothemes');
$order_status_text .= '.';

View File

@ -253,7 +253,7 @@ function woocommerce_add_order_note() {
if ($is_customer_note) echo 'customer-note';
echo '"><div class="note_content">';
echo wpautop(wptexturize($note));
echo '</div><p class="meta">'. sprintf(__('added %s ago', 'woothemes'), human_time_diff(strtotime('NOW'))) .' - <a href="#" class="delete_note">'.__('Delete note', 'woothemes').'</a></p>';
echo '</div><p class="meta">'. sprintf(__('added %s ago', 'woothemes'), human_time_diff(current_time('timestamp'))) .' - <a href="#" class="delete_note">'.__('Delete note', 'woothemes').'</a></p>';
echo '</li>';
endif;