function stpb_carousel_generate($data) { if (empty($data['images'])) { return ''; } $images = $data['images']; $meta = $data['meta']; $html = st_get_content_from_func('st_carousel', $data); return $html; }
function st_shortcode_slider($atts, $content = null) { // echo var_dump($atts); $data['slider_items'] = st_get_setup_post_slider_data($atts); $data['slider_type'] = 'flexslider'; $data['class'] = 'posts-slider'; $data['show_slider'] = 1; $data['size'] = 'st_medium'; return '<div class="post-slider-w silder-wrap">' . st_get_content_from_func('st_the_slider', $data) . '</div>'; }
$title = '<div class="portfolio-desc"><h4 class="im-title"> <a ' . $a_rel . ' href="' . esc_attr($url) . '" title="' . esc_attr($title) . '">' . esc_html($title) . '</a> </h4> </div>'; } if ($caption != '') { } return sprintf($html_format, $img . $title . $caption);
/** * PB Item Widget */ function st_widget_func($atts, $content = '') { $atts = shortcode_atts(array('sidebar' => ''), $atts); extract($atts); $html = '<div class="sidebar builder-sidebar">'; $html .= st_get_content_from_func('dynamic_sidebar', $sidebar); $html .= '</div>'; $html = apply_filters('st_widget_func', $html, $atts); return $html; }
function st_portfolio_thumbnail($post_id = '', $size = 'st_small_thumb', $rand_if_slider = false, $small_video_thumb = false) { $st_page_options = get_page_builder_options($post_id); $html = ''; switch (strtolower($st_page_options['thumbnail_type'])) { case 'video': $video = st_get_video($st_page_options['video_code'], $data); // echo var_dump($data); if (($size == 'st_small_thumb' || $small_video_thumb) && !empty($data)) { $html = '<span class="video-thumb" video="' . $data['type'] . '" size=' . $size . ' video-id="' . $data['video_id'] . '"></span>'; } else { $html = $video; if ($html == '') { $html = '<span class="video-thumb no-thumb"></span>'; } } break; case 'slider': if (count($st_page_options['thumbnails']['images'])) { if ($rand_if_slider === true || $size == 'st_small_thumb') { // show rand image $rand_key = array_rand($st_page_options['thumbnails']['images'], 1); $thumb_image_url = wp_get_attachment_image_src($st_page_options['thumbnails']['images'][$rand_key], $size); $title = 'title="' . esc_attr(sprintf(__('Permalink to %s', 'smooththemes'), get_the_title($post_id))) . '" rel="bookmark" '; $html = '<span class="had-thumb"> <a href="' . get_permalink($post_id) . '" ' . $title . '><img alt="" src="' . $thumb_image_url[0] . '" ></a> </span>'; } else { $slider_data = array_merge(array('slider_items' => $st_page_options['thumbnails']), array('show_caption' => 'no', 'class' => 'portfolio-slider-wrapper', 'size' => $size)); $slider_data['show_slider'] = 1; $slider_data['slider_type'] = 'flexslider'; $html = st_get_content_from_func('st_the_slider', $slider_data); } } else { $html = ' <span class="no-thumb no-slider"></span>'; } break; default: if (has_post_thumbnail($post_id)) { $thumb_id = get_post_thumbnail_id($post_id); $thumb_image_url = wp_get_attachment_image_src($thumb_id, $size); $full_img = wp_get_attachment_image_src($thumb_id, 'full'); $ptitle = get_the_title($post_id); $title = 'title="' . esc_attr(sprintf(__('Permalink to %s', 'smooththemes'), $ptitle)) . '" rel="bookmark" '; $html = ' <a href="' . $full_img[0] . '" rel="prettyPhoto" title="' . esc_html($ptitle) . '"> <span class="portfolio-thumb-hover"></span> <span class="hover-lightbox-image"></span> </a> <img src="' . $thumb_image_url[0] . '" alt="' . esc_html($ptitle) . '"> '; } else { $html = ' <span class="no-thumb"></span>'; } } return apply_filters('st_portfolio_thumbnail', $html, $post_id); }