plugin_includes . 'functions/wpaf-coupon-thumbnail-img.php'; } global $wpaf_coupon_id; $title = get_the_title(); $description = get_post_meta( $wpaf_coupon_id, 'coupon_details_description', true ); $discount_text = get_post_meta( $wpaf_coupon_id, 'coupon_details_discount-text', true ); $coupon_type = get_post_meta( $wpaf_coupon_id, 'coupon_details_coupon-type', true ); $link = get_post_meta( $wpaf_coupon_id, 'coupon_details_link', true ); $coupon_code = get_post_meta( $wpaf_coupon_id, 'coupon_details_coupon-code-text', true ); $show_print_links = get_option( 'wpaf_coupon-print-link' ); $deal_text = get_post_meta( $wpaf_coupon_id, 'coupon_details_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-' . $wpaf_coupon_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' ); $hidden_coupon_hover_text = get_option( 'wpaf_hidden-coupon-hover-text' ); $copy_button_text = get_option( 'wpaf_copy-button-text' ); $coupon_title_tag = get_option( 'wpaf_coupon-title-tag', 'h1' ); $disable_coupon_title_link = get_option( 'wpaf_disable-coupon-title-link' ); $coupon_share = get_option( 'wpaf_coupon-social-share' ); $show_expiration = get_post_meta( $wpaf_coupon_id, 'coupon_details_show-expiration', true ); $today = gmdate( 'd-m-Y' ); $expire_date = get_post_meta( $wpaf_coupon_id, 'coupon_details_expire-date', true ); $expireDateFormat = get_option( 'wpaf_expiry-date-format' ); $hide_coupon = get_post_meta( $wpaf_coupon_id, 'coupon_details_hide-coupon', true ); $wpaf_template_five_theme = get_post_meta( $wpaf_coupon_id, 'coupon_details_template-theme-color', true ); $coupon_thumbnail = wpaf_coupon_thumbnail_img($wpaf_coupon_id); $link_thumbnail = get_option('wpaf_coupon-link-featured-img'); $wpaf_text_to_show = get_option( 'wpaf_text-to-show' ); $wpaf_custom_text = get_option( 'wpaf_custom-text' ); $wpaf_dummy_coupon_img = WPAF_Plugin::instance()->plugin_assets . 'img/coupon-200x200.png'; $coupon_code = ( ! empty( $coupon_code ) ? $coupon_code : __( 'COUPONCODE', 'affcoupon' ) ); $deal_text = ( ! empty( $deal_text ) ? $deal_text : __( 'Get Deal', 'affcoupon' ) ); $linkTarget = get_option("wpaf_coupon-link-target"); $target = ($linkTarget == "on") ? "_self" : "_blank" ; 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( ! $link && WPAF_Amp::wpaf_amp_is() ) $link = "#"; $expireDateFormatFun = wpaf_getExpireDateFormatFun( $expireDateFormat ); 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 ) ); } wp_enqueue_script( 'wpaf-clipboardjs' ); $template = new WPAF_Template_Loader(); $wpaf_uniq_attr = ''; $wpaf_uniq_attr_data = ''; if( function_exists( 'wpaf_uniq_attr' ) && ! WPAF_Amp::wpaf_amp_is() && ! empty( $show_print_links ) && $show_print_links == 'on' ) { $wpaf_uniq_attr = wpaf_uniq_attr( 10 ); $wpaf_uniq_attr_data = 'data-unic-attr="' . $wpaf_uniq_attr . '"'; } ?>