<div class="featured-item-content"> <a href="<?php echo get_permalink($code->ID); ?> "><h4><?php echo $code->post_title; ?> </h4></a> <p><?php echo $code->post_content; ?> </p> <?php $has_ratings = coupon_get_option('code_dailly_ratings'); if (in_array('code', $has_ratings)) { echo coupon_get_ratings($code->ID); } ?> </div> <div class="item-meta"> <ul class="list-inline list-unstyled"> <li> <a href="javascript:;"> <span class="fa fa-clock-o"></span><?php echo coupon_remaining_time($expire_timestamp); ?> </a> </li> <li> <a href="<?php echo esc_url(coupon_get_label_link($shop_id, $code->ID));
<!-- widget-content --> <div class="widget-content"> <!-- coupon-timer --> <div class="time"> <div class="time-caption caption"> <p><?php echo $promo_text; ?> </p> <?php $has_ratings = coupon_get_option('code_dailly_ratings'); if (in_array('dailly', $has_ratings)) { echo coupon_get_ratings(); } ?> </div> <!-- countdown --> <?php if (!empty($offer_expire)) { ?> <div class="time-content"> <span class="coupon-meta-caption"><?php _e('Time Left To Buy', 'coupon'); ?> </span> <!-- COUNTDOWN -->
function coupon_custom_column_populate($column, $post_id) { switch ($column) { case 'code_shop_id': $code_shop_id = get_post_meta($post_id, 'code_shop_id', true); if (!empty($code_shop_id)) { echo get_the_title($code_shop_id); } else { echo ''; } break; case 'code_couponcode': echo get_post_meta($post_id, 'code_couponcode', true); break; case 'code_expire': $code_expire = get_post_meta($post_id, 'code_expire', true); if (!empty($code_expire)) { echo date('F j, Y', $code_expire); } break; case 'offer_expire': $offer_expire = get_post_meta($post_id, 'offer_expire', true); if (!empty($code_expire)) { echo date('F j, Y', $offer_expire); } break; case 'coupon_average_rate': echo coupon_get_ratings($post_id); break; case 'code_clicks': echo get_post_meta($post_id, 'code_clicks', true); break; } }