plugin_includes . 'functions/wpaf-coupon-thumbnail-img.php'; } global $wpaf_coupon_id; $post_id = get_the_ID(); $title = get_the_title(); $description = get_post_meta( $post_id, 'coupon_details_description', true ); $coupon_thumbnail = wpaf_coupon_thumbnail_img( $post_id ); $coupon_thumbnail_not_featured = wpaf_coupon_thumbnail_img( $post_id, true ); $link_thumbnail = get_option('wpaf_coupon-link-featured-img'); $show_hide_feature_image = get_post_meta( $wpaf_coupon_id, 'coupon_details_show-hide-feature-image', true ); $coupon_type = get_post_meta( $post_id, 'coupon_details_coupon-type', true ); $discount_text = get_post_meta( $post_id, 'coupon_details_discount-text', true ); $second_discount_text = get_post_meta( $post_id, 'coupon_details_second-discount-text', true ); $third_discount_text = get_post_meta( $post_id, 'coupon_details_third-discount-text', true ); $link = get_post_meta( $post_id, 'coupon_details_link', true ); $coupon_code = get_post_meta( $post_id, 'coupon_details_coupon-code-text', true ); $second_coupon_code = get_post_meta( $post_id, 'coupon_details_second-coupon-code-text', true ); $third_coupon_code = get_post_meta( $post_id, 'coupon_details_third-coupon-code-text', true ); $deal_text = get_post_meta( $post_id, 'coupon_details_deal-button-text', true ); $second_deal_text = get_post_meta( $post_id, 'coupon_details_second-deal-button-text', true ); $third_deal_text = get_post_meta( $post_id, 'coupon_details_third-deal-button-text', true ); $coupon_hover_text = get_option( 'wpaf_coupon-hover-text' ); $deal_hover_text = get_option( 'wpaf_deal-hover-text' ); $button_class = '.wpaf-btn-' . $post_id; $no_expiry = get_option( 'wpaf_no-expiry-message' ); $expire_text = get_option( 'wpaf_expire-text' ); $expired_text = get_option( 'wpaf_expired-text' ); $hide_coupon_text = get_option( 'wpaf_hidden-coupon-text' ); $hide_coupon_button_color = get_option( 'wpaf_hidden-coupon-button-color' ); $hidden_coupon_hover_text = get_option( 'wpaf_hidden-coupon-hover-text' ); $show_expiration = get_post_meta( $post_id, 'coupon_details_show-expiration', true ); $today = gmdate( 'd-m-Y' ); $time_now = time(); $expire_date = get_post_meta( $post_id, 'coupon_details_expire-date', true ); $second_expire_date = get_post_meta( $post_id, 'coupon_details_second-expire-date', true ); $third_expire_date = get_post_meta( $post_id, 'coupon_details_third-expire-date', true ); $expire_time = get_post_meta( $post_id, 'coupon_details_expire-time', true ); $expireDateFormat = get_option( 'wpaf_expiry-date-format' ); $hide_coupon = get_post_meta( $post_id, 'coupon_details_hide-coupon', true ); $coupon_image_id = get_post_meta( $post_id, 'coupon_details_coupon-image-input', true ); $coupon_image_src = wp_get_attachment_image_src( $coupon_image_id, 'full' ); $wpaf_template_five_theme = get_post_meta( $post_id, 'coupon_details_template-theme-color', true ); $wpaf_template_six_theme = get_post_meta( $post_id, 'coupon_details_template-theme-color', true ); $wpaf_template_seven_theme = get_post_meta( $post_id, 'coupon_details_template-theme-color', true ); $wpaf_template_eight_theme = get_post_meta( $post_id, 'coupon_details_template-theme-color', true ); $wpaf_dummy_coupon_img = WPAF_Plugin::instance()->plugin_assets . 'admin/img/coupon-200x200.png'; $wpaf_text_to_show = get_option( 'wpaf_text-to-show' ); $wpaf_custom_text = get_option( 'wpaf_custom-text' ); $wpaf_eight_btn_text = get_option( 'wpaf_eight-button-text' ); /** Alternative Template Variables */ $disable_coupon_title_link = get_option( 'wpaf_disable-coupon-title-link' ); $coupon_title_tag = get_option( 'wpaf_coupon-title-tag', 'h1' ); $dt_coupon_type_name = get_option( 'wpaf_dt-coupon-type-text' ); /** Seven Template Variables */ $never_expire = get_post_meta( $wpaf_coupon_id, 'coupon_details_never-expire-check', true ); if ( $wpaf_text_to_show == 'description' ) { $wpaf_custom_text = $description; } else { if ( empty( $wpaf_custom_text ) ) { $wpaf_custom_text = __( "Click on 'Copy' to Copy the Coupon Code.", 'affcoupon' ); } } if ( $expireDateFormat == 'mm/dd/yy' ) { $expireDateFormatFun = 'm/d/Y'; } elseif ( $expireDateFormat == 'yy/mm/dd' ) { $expireDateFormatFun = 'Y/m/d'; } else { $expireDateFormatFun = 'd-m-Y'; } if ( ! empty( $expire_date ) && (string)(int)$expire_date == $expire_date ) { $expire_date = gmdate( $expireDateFormatFun, $expire_date ); } elseif ( ! empty( $expire_date ) ) { $expire_date = gmdate( $expireDateFormatFun, strtotime( $expire_date ) ); } if ( ! empty( $second_expire_date ) && (string)(int)$second_expire_date == $second_expire_date ) { $second_expire_date = gmdate( $expireDateFormatFun, $second_expire_date ); } elseif ( ! empty( $second_expire_date ) ) { $second_expire_date = gmdate( $expireDateFormatFun, strtotime( $second_expire_date ) ); } if ( ! empty( $third_expire_date ) && (string)(int)$third_expire_date == $third_expire_date ) { $third_expire_date = gmdate( $expireDateFormatFun, $third_expire_date ); } elseif ( !empty( $third_expire_date ) ) { $third_expire_date = gmdate( $expireDateFormatFun, strtotime( $third_expire_date ) ); } $expire_date_format = gmdate( "m/d/Y", strtotime( $expire_date ) ); /** Setting Default Values if Empty */ $title = ( !empty( $title ) ) ? $title : __( 'Sample Coupon Title', 'affcoupon' ); $description = ( !empty( $description ) ) ? $description : __( 'This is the description of the coupon code. Additional details of what the coupon or deal is.', 'affcoupon' ); $coupon_type = ( !empty( $coupon_type ) ) ? $coupon_type : __( 'Coupon', 'affcoupon' ); $coupon_code = ( !empty( $coupon_code ) ) ? $coupon_code : __( 'COUPONCODE', 'affcoupon' ); $second_coupon_code = ( !empty( $second_coupon_code ) ) ? $second_coupon_code : __( 'COUPONCODE', 'affcoupon' ); $third_coupon_code = ( !empty( $third_coupon_code ) ) ? $third_coupon_code : __( 'COUPONCODE', 'affcoupon' ); $discount_text = ( !empty( $discount_text ) ) ? $discount_text : __( 'Discount Text', 'affcoupon' ); $second_discount_text = ( !empty( $second_discount_text ) ) ? $second_discount_text : __( 'Discount Text', 'affcoupon' ); $third_discount_text = ( !empty( $third_discount_text ) ) ? $third_discount_text : __( 'Discount Text', 'affcoupon' ); $discount_text = ( !empty( $discount_text ) ) ? $discount_text : __( 'Discount Text', 'affcoupon' ); $deal_text = ( !empty( $deal_text ) ) ? $deal_text : __( 'Get Deal', 'affcoupon' ); $second_deal_text = ( !empty( $second_deal_text ) ) ? $second_deal_text : __( 'Get Deal', 'affcoupon' ); $third_deal_text = ( !empty( $third_deal_text ) ) ? $third_deal_text : __( 'Get Deal', 'affcoupon' ); $coupon_hover_text = ( !empty( $coupon_hover_text ) ) ? $coupon_hover_text : __( 'Click To Copy Coupon', 'affcoupon' ); $deal_hover_text = ( !empty( $deal_hover_text ) ) ? $deal_hover_text : __( 'Click Here To Get This Deal', 'affcoupon' ); $no_expiry = ( !empty( $no_expiry ) ) ? $no_expiry : __( "Doesn't Expire", 'affcoupon' ); $expire_text = ( !empty( $expire_text ) ) ? $expire_text : __( 'Expires on: ', 'affcoupon' ); $expired_text = ( !empty( $expired_text ) ) ? $expired_text : __( 'Expired on: ', 'affcoupon' ); $hide_coupon_text = ( !empty( $hide_coupon_text ) ) ? $hide_coupon_text : __( 'Show Code', 'affcoupon' ); $hidden_coupon_hover_text = ( !empty( $hidden_coupon_hover_text ) ) ? $hidden_coupon_hover_text : __( 'Click Here to Show Code', 'affcoupon' ); $wpaf_eight_btn_text = ( !empty( $wpaf_eight_btn_text ) ) ? $wpaf_eight_btn_text : __( 'GET THE DEAL', 'affcoupon' ); ?>
{$title}" ); else: echo wp_kses_post( "{$title}" ); endif; ?>
' . $expire_date . '' ); ?>
' . $expire_date . '' ); ?>

' . $expire_date . '' );?>
' . $expire_date . '' );?>

' . $expire_date . '' ); ?>

' . $expire_date . '' ); ?>

{$title}" ); else: echo wp_kses_post( "{$title}" ); endif; ?>

' . $expire_date . '' ); ?>

' . $expire_date . '' ); ?>

Coupon

' . $expire_date . '' );?>

' . $expire_date . '' ); ?>

' . $expire_date . '' ); ?>
' . $expire_date . '' ); ?>

Coupon

' . $description . '

' );?>

< class="admin-wpaf-new-title wpaf-coupon-title"> > < class="admin-wpaf-new-title wpaf-coupon-title"> > < class="admin-wpaf-new-title wpaf-coupon-title"> >

' . '' . esc_html( $expire_date ) . '' ); ?>

' . '' . esc_html( $expire_date ) . '' ); ?>

<?php esc_html_e( 'Coupon image not uploaded', 'affcoupon' ); ?>