function jr_remaining_days($post) {
$date = get_post_meta($post->ID, '_expires', true);
if ($date) :
$days = ($date-strtotime('NOW'))/86400;
if($days < 1 && $days > 0) $days = 1;
if (floor($days)==1) return '1 '.__('day','appthemes');
if ($days<=0) return __('Expired', 'appthemes');
return floor($days).' '.__('days','appthemes');
endif;
return '-';
}
There are currently 1 users browsing this thread. (0 members and 1 guests)