/** * Shortcode to show offer */ function shortcode_for_showing_offers($atts) { extract(shortcode_atts(array('display_as' => '', 'offer_ids' => ''), $atts)); $so_offers = new SO_Offers(); $offers_data = $so_offers->get_offers($offer_ids); if (empty($offers_data)) { return; } $so_offer = new SO_Offer(); $so_offer->prepare_offer($display_as, $offers_data); }