';
if(isset($atts['image_id']) && $atts['image_id']):
$offer_thumb = wp_get_attachment_url($atts['image_id']);
$show_offer_thumb = new WPSM_image_resizer();
$show_offer_thumb->src = $offer_thumb;
$show_offer_thumb->width = '90';
$show_offer_thumb->height = '90';
$show_offer_thumb->crop = false;
$checklink = (isset($atts['button_link'])) ? esc_url($atts['button_link']) : '';
$out .= '
';
elseif(isset($atts['thumb']) && $atts['thumb']):
$offer_thumb = $atts['thumb'];
$show_offer_thumb = new WPSM_image_resizer();
$show_offer_thumb->src = $offer_thumb;
$show_offer_thumb->width = '90';
$show_offer_thumb->height = '90';
$show_offer_thumb->crop = false;
$out .= '
';
if($title):
$out .= '
'.$title.'
';
endif;
if(isset($atts['description']) && $atts['description']):
$out.= '
'.$atts['description'].'
';
endif;
$out .= '
';
if(isset($atts['price']) && $atts['price']):
$out .= '
'.$atts['price'].' ';
if(isset($atts['price_old']) && $atts['price_old']):
$out .= ''.$atts['price_old'].'';
endif;
$out .= '';
endif;
if(isset($atts['logo_image_id']) && $atts['logo_image_id']):
$logo_thumb = wp_get_attachment_url($atts['logo_image_id']);
$show_logo_thumb = new WPSM_image_resizer();
$show_logo_thumb->src = $logo_thumb;
$show_logo_thumb->width = '50';
$out .= '
';
elseif(isset($atts['logo_thumb']) && $atts['logo_thumb']):
$logo_thumb = $atts['logo_thumb'];
$show_logo_thumb = new WPSM_image_resizer();
$show_logo_thumb->src = $logo_thumb;
$show_logo_thumb->width = '50';
$out .= '
';
endif;
$out .= '
';
if(isset($atts['button_link']) && $atts['button_link']):
$out .= '
';
endif;
if(!empty($atts['offer_coupon'])) :
wp_enqueue_script('zeroclipboard');
if (empty($atts['offer_coupon_mask'])) :
$out .= '
'.$atts['offer_coupon'].'
';
else :
wp_enqueue_script('affegg_coupons');
$out .= '
'.$offer_coupon_mask_text.'
';
endif;
endif;
if(!empty($atts['offer_coupon_date'])) :
$out .='
'.$coupon_text.'
';
endif;
$out .= '