public function register_shortcode($atts, $content = null) { $atts = shortcode_atts(array('lat_long' => '51.5862682,-0.3009941', 'zoom' => 7, 'type' => 'roadmap', 'style' => apply_filters('vc_pt/current_theme_google_map_style', 'CargoPress'), 'height' => 380), $atts); $locations = PT_VC_Helper_Functions::get_child_elements_data($content); $instance = array('locations' => $locations, 'latLng' => $atts['lat_long'], 'zoom' => absint($atts['zoom']), 'type' => $atts['type'], 'style' => $atts['style'], 'height' => absint($atts['height'])); ob_start(); the_widget('PW_Google_Map', $instance); return ob_get_clean(); }
public function register_shortcode($atts, $content = null) { $atts = shortcode_atts(array('title' => ''), $atts); $items = PT_VC_Helper_Functions::get_child_elements_data($content); $instance = array('title' => $atts['title'], 'items' => $items); ob_start(); the_widget('PW_Steps', $instance); return ob_get_clean(); }
public function register_shortcode($atts, $content = null) { $atts = shortcode_atts(array('new_tab' => ''), $atts); $social_icons = PT_VC_Helper_Functions::get_child_elements_data($content); $instance = array('new_tab' => $atts['new_tab'], 'social_icons' => $social_icons); ob_start(); the_widget('PW_Social_Icons', $instance); return ob_get_clean(); }
public function register_shortcode($atts, $content = null) { $atts = shortcode_atts(array('speed' => '1000'), $atts); $counters = PT_VC_Helper_Functions::get_child_elements_data($content); $instance = array('speed' => absint($atts['speed']), 'counters' => $counters); ob_start(); the_widget('PW_Number_Counter', $instance); return ob_get_clean(); }
public function register_shortcode($atts, $content = null) { $atts = shortcode_atts(array('title' => __('Testimonials', 'vc-elements-pt'), 'autocycle' => 'no', 'interval' => '5000'), $atts); $testimonials = PT_VC_Helper_Functions::get_child_elements_data($content); $instance = array('title' => $atts['title'], 'autocycle' => $atts['autocycle'], 'interval' => absint($atts['interval']), 'testimonials' => $testimonials); // Unique widget id so that the navigation/slider for testimonials work properly. $args = array('widget_id' => uniqid('widget-id-')); ob_start(); the_widget('PW_Testimonials', $instance, $args); return ob_get_clean(); }
public function register_shortcode($atts, $content = null) { $atts = shortcode_atts(array('title' => '', 'read_more_url' => ''), $atts); $items = PT_VC_Helper_Functions::get_child_elements_data($content); // Set id for each item foreach ($items as $key => $item) { $items[$key]['id'] = $key; } $instance = array('title' => $atts['title'], 'read_more_link' => $atts['read_more_url'], 'items' => $items); $args['widget_id'] = uniqid('widget-'); ob_start(); the_widget('PW_Accordion', $instance, $args); return ob_get_clean(); }