/** * Display the amount of time left in the campaign in the summary block. * * @param Charitable_Campaign $campaign * @return boolean True if the template was displayed. False otherwise. * @since 1.0.0 */ function charitable_template_campaign_time_left($campaign) { if ($campaign->is_endless()) { return false; } charitable_template('campaign/summary-time-left.php', array('campaign' => $campaign)); return true; }
<li class="campaign"> <?php if ($show_thumbnail && has_post_thumbnail()) { the_post_thumbnail($thumbnail_size); } ?> <h6 class="campaign-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h6> <?php if (!$campaign->is_endless()) { ?> <div class="campaign-time-left"><?php echo $campaign->get_time_left(); ?> <?php } ?> </li> <?php } ?>