zZzzZ.
home2
/
zrzvbdry
/
airuzu.com
/
wp-content
/
themes
/
savings-pro-main
/
loop
New Folder
Editing: trending_coupon.php
Save
Cancel
<?php $has_thumb = wpcoupon_maybe_show_coupon_thumb(); $has_expired = wpcoupon_coupon()->has_expired(); ?> <div data-id="<?php echo wpcoupon_coupon()->ID; ?>" class="coupon-item <?php echo $has_thumb ? 'has-thumb' : 'no-thumb'; ?> store-listing-item tending-coupon-listing-item shadow-box <?php echo ( $has_expired ) ? 'coupon-expired' : 'coupon-live'; ?> coupon-listing-item"> <!-- <div data-id="<?php echo wpcoupon_coupon()->ID; ?>" class="coupon-item <?php echo $has_thumb ? 'has-thumb' : 'no-thumb'; ?> store-listing-item c-type-<?php echo esc_attr( wpcoupon_coupon()->get_type() ); ?> coupon-listing-item shadow-box <?php echo ( $has_expired ) ? 'coupon-expired' : 'coupon-live'; ?>"> --> <?php if ( $has_thumb ) { $myimage = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');?> <?php $background_colors = array('#b1ebc6', '#b1bbeb', '#ebd9b1', '#ebb1df', '#ffffff'); $count = count($background_colors) - 1; $i = rand(0, $count); $rand_background = $background_colors[$i]; if( $myimage ){?> <div class="store-thumb-link" style="background: url(<?php echo $myimage[0]; ?>);" > <?php }else{ $bg_color = array('#a30000', '#0058a3', '#00a37d', '#a37800'); $count_1 = count($bg_color) - 1; $i_1 = rand(0, $count_1); $rand_background_1 = $bg_color[$i_1]; ?> <div class="store-thumb-link" style="background:<?php echo $rand_background_1; ?>;" > <?php } ?> <div class="store-thumb"> <?php if ( ! $thumb_text ) { ?> <?php if ( ! is_tax( 'coupon_store' ) ) { ?> <a class="thumb-padding" href="<?php echo esc_attr( wpcoupon_coupon()->get_store_url() ); ?>" style="background-color: <?php echo $rand_background; ?>;"> <?php echo wpcoupon_coupon()->get_store_thumb( 'wpcoupon_medium-thumb' ); ?> </a> <?php } else { ?> <span class="thumb-padding store-th" > <?php echo wpcoupon_coupon()->get_store_thumb( 'wpcoupon_medium-thumb' ); ?> </span> <?php } ?> <?php } else { ?> <span class="thumb-padding"> <?php $text = get_post_meta( wpcoupon_coupon()->ID, '_wpc_coupon_save', true ); $is_free_shipping = get_post_meta( wpcoupon_coupon()->ID, '_wpc_free_shipping', true ); $a = explode( '|', $text ); if ( count( $a ) > 1 ) { $text = $a[0]; if ( $is_free_shipping ) { esc_html_e( 'Free Shipping', 'savings-pro' ); } elseif ( $text ) { echo wp_kses_post( $text ); } if ( $a[1] ) { echo '<span>' . esc_html( $a[1] ) . '</span>'; } } else { if ( $is_free_shipping ) { esc_html_e( 'Free Shipping', 'savings-pro' ); } elseif ( $text ) { echo wp_kses_post( $text ); } } ?> </span> <?php } ?> </div> </div> <?php } ?> <div class="coupon-des" style="background: <?php $instance['content_des_color']; ?>"> <div class="coupon-store"> <span><?php echo esc_html_e(wpcoupon_coupon()->store->name ); ?></span> </div> <a title="<?php echo esc_attr( get_the_title( wpcoupon_coupon()->ID ) ) ?>" <?php if ( ! wpcoupon_is_single_enable() ) { ?> rel="nofollow" <?php } ?> class="coupon-link" data-type="<?php echo wpcoupon_coupon()->get_type(); ?>" data-coupon-id="<?php echo wpcoupon_coupon()->ID; ?>" data-aff-url="<?php echo esc_attr( wpcoupon_coupon()->get_go_out_url() ); ?>" data-code="<?php echo esc_attr( wpcoupon_coupon()->get_code() ); ?>" href="<?php echo esc_attr( wpcoupon_coupon()->get_href() ); ?>"> <div class="coupon-title"> <?php edit_post_link('<i class="edit icon"></i>', '', '', wpcoupon_coupon()->ID ); ?> <a title="<?php echo esc_attr( get_the_title( wpcoupon_coupon()->ID ) ) ?>" <?php if ( ! wpcoupon_is_single_enable() ) { ?> rel="nofollow" <?php } ?> class="coupon-link" data-type="<?php echo wpcoupon_coupon()->get_type(); ?>" data-coupon-id="<?php echo wpcoupon_coupon()->ID; ?>" data-aff-url="<?php echo esc_attr( wpcoupon_coupon()->get_go_out_url() ); ?>" data-code="<?php echo esc_attr( wpcoupon_coupon()->get_code() ); ?>" href="<?php echo esc_attr( wpcoupon_coupon()->get_href() ); ?>"><?php echo get_the_title( wpcoupon_coupon()->ID ); ?></a> <?php echo substr($coupon_title,0,150) . '';?> </div> </a> <?php get_template_part('loop/coupon-footer-meta'); ?> </div> <?php get_template_part('loop/coupon-modal'); ?> </div>