function ts_livicon_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'style' => '', 'livicon' => '', 'icon_animation' => '', 'event' => '', 'loop' => 'no', 'shadow' => 'no', 'color' => '', 'hover_color' => '', 'size' => '', 'title' => ''), $atts)); $html = null; $attr = 'class="livicon ' . ts_get_animation_class($animation); if ($shadow == 1) { $attr .= ' shadowed2'; } $attr .= '"'; $attr .= 'data-n="' . esc_attr($livicon) . '" '; $attr .= 'data-s="' . esc_attr($size) . '" '; $attr .= 'data-op="0" data-c="' . esc_attr($color) . '" '; $attr .= 'data-hc="' . esc_attr($hover_color) . '" '; $attr .= 'title="' . esc_attr($title) . '" '; $attr .= ts_get_animation_data_class($animation_delay, $animation_iteration) . ' '; if ($icon_animation == 'no') { $attr .= 'data-a="0" '; } if ($event == 'click') { $attr .= 'data-et="click" '; } if ($loop == 'yes') { $attr .= 'data-l="1" '; } else { if (intval($loop) > 1) { $attr .= 'data-i="' . esc_attr(intval($loop)) . '" '; } } $html = '<div ' . $attr . '></div>'; if ($style == 'outlined') { $html = '<div class="icon liviconslist-item">' . $html . '</div>'; } return $html; }
function ts_text_func($atts) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'pfont' => '12px', 'content' => ''), $atts)); $style = ''; $style = 'style="font-size:' . esc_attr($pfont) . '"'; return '<div ' . ts_get_animation_class($animation, true) . ' ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' ' . $style . ' >' . $content . '</div>'; }
function ts_skills_circular_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => 'Honesty', 'percent' => '75', 'animation' => '', 'color' => ''), $atts)); $output = " \n\t\t<div class='progress-circular bottom-padding bottom-padding-mini " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . ">\n <input type='text' class='knob' value='0' rel='" . esc_attr($percent) . "' data-linecap='round' data-width='200' data-bgcolor='#f2f2f2' data-fgcolor='" . esc_attr($color) . "' data-thickness='.15' data-readonly='true' disabled=''>\n <p class='white'>{$title}</p>\n </div>"; wp_enqueue_script('knob'); return $output; }
function ts_button_outlined_func($atts, $content = null) { $oArgs = ThemeArguments::getInstance('ts_button_outlined_func'); $button_id = (int) $oArgs->get('button_id') + 1; $oArgs->set('button_id', $button_id); extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', "icon" => '', "color" => '', "hover_color" => '', "background_color" => '', "background_hover_color" => '', "size" => '', "url" => '', 'target' => '_self', 'align' => ''), $atts)); $button_class = 'button btn btn-border ' . $size; if (empty($url)) { $url = '#'; } $button_styles = ''; $button_data = ''; if (!empty($color)) { $button_styles .= "color:{$color}; border-color: {$color};"; $button_data .= 'data-color="' . esc_attr($color) . '"'; } if (!empty($hover_color)) { $button_data .= 'data-hover-color="' . esc_attr($hover_color) . '"'; } if (!empty($background_color)) { $button_styles .= "background-color:{$background_color};"; $button_data .= 'data-background-color="' . esc_attr($background_color) . '"'; } if (!empty($background_hover_color)) { $button_data .= 'data-background-hover-color="' . esc_attr($background_hover_color) . '"'; } $icon_html = ''; if ($icon && $icon != 'no') { $icon_html = '<i class="icons ' . esc_attr($icon) . '"></i>'; } return '<div class="xbtn ' . sanitize_html_classes($align) . '"><a id="button-' . esc_attr($button_id) . '" ' . esc_attr($button_data) . ' class="' . esc_attr($button_class) . ' ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' href="' . esc_url($url) . '" target="' . esc_attr($target) . '" style="' . $button_styles . '">' . $icon_html . $content . '</a></div>'; }
function ts_container_func($atts) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'content_box' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore libero autem tempora cumque officiis sapiente maxime sit facere assumenda quisquam amet consequatur ad delectus accusantium quia saepe quas repellendus optio distinctio nobis consequuntur culpa eligendi quibusdam nesciunt maiores alias ex.', 'style' => '1', 'icon' => '', 'icon_color' => ''), $atts)); $class_wrapper = null; switch ($style) { case '1': $classes = 'content-block bottom-padding frame'; break; case '2': $classes = 'content-block bottom-padding frame border-radius'; break; case '3': $classes = 'content-block bottom-padding frame-shadow-lifted'; break; case '4': $classes = 'content-block bottom-padding frame frame-shadow-lifted'; break; case '5': $classes = 'content-block bottom-padding frame-shadow-lifted bg'; break; case '6': $classes = 'content-block bottom-padding frame-shadow-raised text-center'; break; case '7': $classes = 'content-block bottom-padding frame frame-shadow-curved'; break; case '8': $classes = 'content-block bottom-padding frame frame-shadow-lifted'; break; case '9': $classes = 'content-block bottom-padding frame frame-shadow-curved border-radius'; break; case '10': $classes = 'bottom-padding frame-shadow-lifted bg'; break; case '11': $class_wrapper = 'rotated-box'; $classes = 'content-block bottom-padding frame frame-shadow-lifted'; break; case '12': $class_wrapper = 'rotated-right-box'; $classes = 'content-block bottom-padding frame frame-shadow-curved border-radius'; break; case '13': $classes = 'content-block text-center frame-shadow bottom-padding'; break; default: $classes = 'bottom-padding frame-shadow-lifted bg'; break; } $icon_html = ''; if (!empty($icon)) { $icon_html = '<span class="icon bg circle icon-60 pull-left"><i class="' . sanitize_html_class($icon) . '" ' . (!empty($icon_color) ? 'style="color: ' . esc_attr($icon_color) . '"' : '') . '></i></span>'; } $output = "\n\t\t<div class='" . sanitize_html_classes($classes) . " " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . ">\n\t\t\t{$icon_html}\n\t\t\t<span class='lead'>{$content_box}</span>\n\t\t</div>"; if (!empty($class_wrapper)) { return "<div class='" . sanitize_html_classes($class_wrapper) . "'>{$output}</div>"; } return $output; }
function ts_portfolio_item_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => 0), $atts)); global $post; $html = ''; $new_post = null; if (!empty($id)) { $new_post = get_post($id); } if ($new_post) { $post = $new_post; setup_postdata($post); $image = ''; $slider = ''; $portfolio_slider = ts_get_post_opt('portfolio_slider'); if (is_array($portfolio_slider) && count($portfolio_slider) > 0) { foreach ($portfolio_slider as $slide) { if (!empty($slide['image'])) { $image = theme_thumb($slide['image'], 370, 270, 'c'); } $slider .= ' <div class="col-sm-12 col-md-12"> <img src="' . esc_url($image) . '" alt="" title=""> </div>'; } } if (!empty($slider)) { $gallery = ' <div class="carousel-box load" data-carousel-pagination="true" data-carousel-nav="false" data-carousel-one="true"> <div class="row"> <div class="carousel">' . $slider . '</div> </div> <div class="clearfix"></div> <div class="pagination switches"></div> </div>'; } else { $gallery = '<img src="' . esc_url(get_xv_thumbnail(370, 270)) . '" class="single-image" />'; } $html = ' <div class="work-single row ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '> <div class="images-box col-sm-5 col-md-4"> ' . $gallery . ' </div> <div class="work-description col-sm-7 col-md-8"> <h3 class="title">' . get_the_title() . '</h3> <div class="type">' . xv_get_field('client') . '</div> <div> ' . apply_filters('the_content', get_the_content()) . ' <div class="tags"><b>' . __('Categories', 'progressive') . ': </b>' . strip_tags(get_the_term_list($post->ID, 'portfolio_category', '', ', ')) . '</div> </div> </div> <div class="clearfix"></div> </div>'; wp_reset_postdata(); } return $html; }
function ts_container_func($atts) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'content_box' => '', 'style' => '1'), $atts)); ob_start(); $output = "\n\t\t<div class='content-block bottom-padding frame-shadow-lifted bg " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . ">\n\t\t\t<span class='lead'>" . wp_kses_post($content_box) . "</span>\n\t\t</div>"; ob_end_clean(); return $output; }
function ts_sitemap_func($atts) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'sitemap' => ''), $atts)); $html = ''; ob_start(); ?> <ul class="sitemap <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <?php switch ($sitemap) { case 'pages': wp_list_pages("title_li="); break; case 'posts': $archive_query = new WP_Query('showposts=1000&cat=-8'); while ($archive_query->have_posts()) { $archive_query->the_post(); ?> <li> <a href="<?php echo esc_url(get_the_permalink()); ?> " rel="bookmark" title="<?php echo esc_attr(get_the_title()); ?> "><?php the_title(); ?> </a> </li> <?php } break; case 'categories': wp_list_categories('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); break; case 'archives': wp_get_archives('type=monthly&show_post_count=true'); break; default: wp_list_pages("title_li="); break; } ?> </ul> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function ts_banner_carousel_func($atts, $content = null) { global $post; extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'carousel_style' => '', 'full_width_lines' => '', 'category' => '', 'limit' => 10), $atts)); // Reset and setup variables $output = ''; $temp_title = ''; $temp_link = ''; $carousel_classes = ''; if ($carousel_style == 'mini') { $width = 127; $height = 79; $carousel_classes = 'banner-set-mini banner-set-no-pagination'; } else { $width = 253; $height = 158; } if ($full_width_lines == 'enabled') { $carousel_classes .= ' banner-border-shop'; } $output .= "<div class='banner-set load " . sanitize_html_classes($carousel_classes) . "'>\n <div class='container'>\n <div class='banners'>"; $args = array('post_type' => 'banner', 'posts_per_page' => $limit); if (!empty($category)) { $args['tax_query'] = array(array('taxonomy' => 'banner-cat', 'field' => 'id', 'terms' => $category)); } $current_animation_delay = $animation_delay; query_posts($args); // the loop if (have_posts()) { while (have_posts()) { the_post(); $temp_title = get_the_title($post->ID); $url = xv_get_field('url'); $temp_link = '#'; if ($url) { $temp_link = $url; } $excerpt = get_xv_excerpt(250); // output all findings - CUSTOMIZE TO YOUR LIKING $output .= "<a class='banner " . ts_get_animation_class($animation) . "' href='" . esc_url($temp_link) . "' " . ts_get_animation_data_class($current_animation_delay, $animation_iteration) . ">"; $thumb = get_xv_thumbnail($width, $height); $output .= '<img src="' . esc_url($thumb) . '" alt="' . the_title_attribute('echo=0') . '" />'; $output .= "<h2 class='title'>{$temp_title}</h2>"; if ($carousel_style != 'mini') { $output .= "<div class='description'>{$excerpt}</div>"; } $output .= "</a>"; $current_animation_delay += $animation_delay_item; } } wp_reset_query(); $output .= "</div>\n <div class='clearfix'></div>\n </div>\n <div class='nav-box " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($current_animation_delay, $animation_iteration) . ">\n <div class='container'>\n <a class='prev' href='#'><span class='icon-left'></span></a>\n <div class='pagination switches'></div>\n <a class='next' href='#'><span class='icon-right'></span></a> \n </div>\n </div>\n </div>\n <div class='clearfix'></div>"; return $output; }
function ts_progressive_menu_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'nav_menu' => ''), $atts)); $output = ''; $output .= '<aside class="sidebar ' . ts_get_animation_class($animation, true) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>'; ob_start(); $args = array(); the_widget('WP_Progressive_Menu_Widget', $atts, $args); $output .= ob_get_clean(); $output .= '</aside>'; return $output; }
function ts_modal_func($atts) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'message' => 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.', 'button_text' => ''), $atts)); ob_start(); ?> <div <?php echo ts_get_animation_class($animation, true); ?> <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="button-list"> <button data-target="#modal-1" data-toggle="modal" class="btn push-top push-bottom btn-default"> <?php echo wp_kses_post($button_text); ?> </button> </div> <div class="modal fade" id="modal-1" tabindex="-1" role="dialog" aria-labelledby="modalLabel-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <a aria-hidden="true" data-dismiss="modal" class="close" href="#">×</a> <?php if (!empty($title)) { echo '<div class="title-box"><h4 class="title">' . esc_html($title) . '</h4></div>'; } ?> </div> <div class="modal-body"> <?php echo wp_kses_post($message); ?> </div> <div class="modal-footer"> <button data-dismiss="modal" class="btn btn-default" type="button"><?php _e('Close', 'progressive'); ?> </button> </div> </div> </div> </div> </div> <?php $output = ob_get_contents(); wp_enqueue_script('raphael'); // wp_enqueue_script( 'liviv', get_template_directory_uri() . '/js/livicons-1.3.min.js', array ('jquery'), null, true ); ob_end_clean(); return $output; }
function ts_another_call_to_action_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', "btn1_text" => '', "btn2_text" => '', "btn1_url" => '', "btn2_url" => ''), $atts)); $output = "<div class='content-block frame text-center bottom-padding " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . ">\n <p class='lead'>{$content}</p>"; if (!empty($btn1_text)) { $output .= "<a href='" . esc_url($btn1_url) . "' data-animation='bounceIn' class='btn btn-default appear-animation bounceIn appear-animation-visible'>{$btn1_text}</a>"; } if (!empty($btn2_text)) { $output .= "<a href='" . esc_url($btn2_url) . "' data-animation='bounceIn' class='btn btn-default appear-animation bounceIn appear-animation-visible'>{$btn2_text}</a>"; } $output .= "</div>"; return $output; }
/** * Visual Composer Eelement: Steps * */ function ts_steps_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'step' => '', 'style' => '', 'align' => ''), $atts)); $align_class = ''; return ' <div class="steps progress-steps ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '> <div class="step ' . sanitize_html_classes($style) . ' ' . sanitize_html_classes($align) . '"> <div class="step-wrapper"> <div class="number">' . $step . '</div> ' . do_shortcode($content) . ' </div> </div> </div>'; }
function ts_hr_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'color' => '', 'style' => ''), $atts)); $html = null; $divider_style = array(); if (!empty($color)) { $divider_style[] = 'border-color:' . esc_attr($color); } $divider_style_html = null; if (is_array($divider_style)) { $divider_style_html = 'style="' . implode(';', $divider_style) . '"'; } $html .= '<hr class="divider ' . sanitize_html_classes($style) . ' ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' ' . $divider_style_html . ' >'; return $html; }
/** * Visual Composer Eelement: Heading * */ function ts_heading_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'color' => '', 'type' => 1, 'align' => '', 'style' => '', 'id' => ''), $atts)); if (intval($type) < 1 || intval($type) > 6) { $type = 1; } if (!empty($color)) { $color = 'style="color:' . esc_attr($color) . '"'; } $id_attr = ''; if (!empty($id)) { $id_attr = 'id="' . esc_attr($id) . '"'; } return "<div " . $id_attr . " class='" . sanitize_html_classes($style) . " " . sanitize_html_class($align) . " " . ts_get_animation_class($animation) . "' " . ts_get_animation_data_class($animation_delay, $animation_iteration) . "><h" . esc_attr($type) . " class='title' " . $color . ">" . do_shortcode($content) . "</h" . esc_attr($type) . "></div>"; }
function ts_map_container_func($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'height' => '300', 'zoom' => '6', 'lat' => '40.748441', 'lng' => '73.985664', 'marker_title' => '', 'marker_content' => '', 'style' => '', 'color' => '', 'area_1_title' => '', 'area_1_content' => '', 'area_2_title' => '', 'area_2_content' => '', 'area_3_title' => '', 'area_3_content' => ''), $atts)); $class = ''; $path = get_template_directory_uri(); $output = ''; if (!empty($title)) { $output = '<div class="title-box"> <h2 class="title">' . $title . '</h2> </div>'; } $overlay = ''; if (!empty($area_1_title) || !empty($area_1_content) || !empty($area_2_title) || !empty($area_2_content) || !empty($area_3_title) || !empty($area_3_content)) { $overlay = ' <div class="contact-info col-sm-6 col-md-6 ' . ts_get_animation_class('fadeInLeftBig') . '" ' . ts_get_animation_data_class(1500, 0) . '> <address> <div class="title">' . $area_1_title . '</div> ' . ts_emailize($area_1_content) . ' </address> <div class="row"> <address class="col-sm-6 col-md-6"> <div class="title">' . $area_2_title . '</div> ' . ts_emailize($area_2_content) . ' </address> <address class="col-sm-6 col-md-6"> <div class="title">' . $area_3_title . '</div> ' . ts_emailize($area_3_content) . ' </address> </div> </div>'; } $output .= ' <div class="map-box"> ' . $overlay . ' <div class="map-canvas" style="height: ' . esc_attr($height) . 'px;" data-zoom="' . esc_attr($zoom) . '" data-lat="' . esc_attr($lat) . '" data-lng="' . esc_attr($lng) . '" data-title="' . esc_attr($marker_title) . '" data-content="' . esc_attr($marker_content) . '" data-pin="' . esc_url($path) . '/img/svg/map-marker.svg" data-type="' . esc_attr($style) . '"></div> </div>'; wp_enqueue_script('google-map-api'); return $output; }
function ts_alert_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'style' => 'info', 'icon' => '', 'hide_icon' => 'yes', 'close_btn' => 'yes', 'message' => ''), $atts)); $html = ''; if ($icon != '' && $hide_icon != 'yes') { $icon = '<div class="alert-icon ' . sanitize_html_class($icon) . '"></div>'; } else { $icon = ''; } $html .= '<div class="alert alert-' . sanitize_html_class($style) . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>' . $icon . '<p>' . $message . '</p>'; if ($close_btn == 'yes') { $html .= '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'; } $html .= '</div>'; return $html; }
function ts_button_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', "icon" => '', "livicon" => '', "animate_on" => 'button', "background" => '', "color" => '', "hover" => '', "border" => '', "size" => '', "url" => '', 'target' => '_self', 'align' => ''), $atts)); $button_class = 'button btn ' . $size; if (empty($url)) { $url = '#'; } $button_styles = ''; if (!empty($color)) { $button_styles .= "color:{$color};"; } if (!empty($background)) { $button_styles .= "background-color:{$background};"; } if (!empty($hover)) { $button_styles .= "background-color:{$background};"; } $button_styles .= "border-color:{$border};"; $icon_html = ''; if ($livicon != '') { $animate_attr = 'data-hc="0"'; if ($animate_on == 'icon') { $animate_attr = 'data-op="0"'; } $icon_html = '<i class="livicon" data-n="' . esc_attr($livicon) . '" data-s="24" data-c="' . esc_attr($color) . '" data-hc="' . esc_attr($color) . '" ' . $animate_attr . '></i>'; $icon_metro = '<span class="livicon metro-bg" data-n="' . esc_attr($livicon) . '" data-s="32" data-c="' . esc_attr($color) . '" data-hc="' . esc_attr($color) . '" data-op="1" style=' . esc_attr($button_styles) . '></span>'; } else { if ($icon && $icon != 'no') { $icon_html = '<i class="icons ' . esc_attr($icon) . '"></i>'; $icon_metro = '<span class="metro-bg" style=' . esc_attr($button_styles) . '>' . $icon_html . '</span>'; } } if ($size == 'metro') { $html = '<a title="' . esc_attr($content) . '" class="' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' href="' . esc_url($url) . '" target="' . esc_attr($target) . '">' . $icon_metro . '</a>'; } else { $html = '<a class="' . esc_attr($button_class) . ' ' . ts_get_animation_class($animation) . '" ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . ' href="' . esc_url($url) . '" target="' . esc_attr($target) . '" style=' . esc_attr($button_styles) . '>' . $icon_html . $content . '</a>'; } if (!empty($align) && $align != 'none') { $html = '<div class="xbtn ' . esc_attr($align) . '">' . $html . '</div>'; } return $html; }
function ts_newsletter_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'id' => '1'), $atts)); ob_start(); ?> <div class="sidebar vc_newsletter <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="newsletter"> <?php echo apply_filters('vc_wysija__shortcode', do_shortcode('[wysija_form id="' . $id . '"]')); ?> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function ts_image_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'img_url' => '', 'caption' => '', 'img_link' => '', 'style' => '', 'width' => '', 'height' => '', 'align' => '', 'output' => '', 'hover_border' => '', 'hover_opacity' => '', 'frame' => ''), $atts)); $attachment_id = $img_url; $image_attributes = wp_get_attachment_image_src($attachment_id, 'full'); // returns an array if (isset($image_attributes[0])) { $img_url = $image_attributes[0]; } //$output .= $img_url; $img_url = get_xv_resizer($img_url, $width, $height); if (!empty($img_link)) { $output .= "<a class='frame-hover " . esc_attr($hover_border) . "' href='" . esc_url($img_link) . "' >"; } $output .= "<div class='" . sanitize_html_classes($frame) . " " . esc_attr($style) . " " . esc_attr($align) . " " . esc_attr($hover_opacity) . "'>\n\t\t\t\t\t<img alt='" . esc_attr($caption) . "' src='" . esc_url($img_url) . "'>\n\t\t\t\t</div>"; if (!empty($img_link)) { $output .= "</a>"; } if (!empty($caption)) { $output .= "<div class='caption'>{$caption}</div>"; } return '<div ' . ts_get_animation_class($animation, true) . ' ' . ts_get_animation_data_class($animation_delay, $animation_iteration) . '>' . $output . '</div>'; }
function ts_service_func($atts) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => 'Your Service Title', 'style' => '1', 'style_color' => '1', 'icon' => '', 'message' => 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.', 'button_text' => '', 'url' => '', 'livicon' => '', 'livicon_size' => '64', 'livicon_color' => '', 'icon_color' => '#c10841', 'icon_bg_color' => '', 'icon_border_color' => '', 'read_btn_color' => '#c10841', 'read_txt_color' => '', 'hide_icon' => '', 'close_btn' => ''), $atts)); $html = ''; ob_start(); if ($icon != '' && $hide_icon != 'yes') { $icon = '<div class="service-icon ' . esc_attr($icon) . '"></div>'; } if (!empty($livicon)) { $icon = "<div class='livicon livicon-size-" . esc_attr($livicon_size) . "' data-n='" . esc_attr($livicon) . "' data-c='" . esc_attr($livicon_color) . "' data-s='" . esc_attr($livicon_size) . "' data-hc='0'></div>"; } ?> <?php if ($style_color == 'white') { echo '<div class="white">'; } if ($style == 1) { ?> <div class="big-services-box <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="big-icon bg"><?php echo $icon; ?> </div> <h4 class="title"><?php echo esc_html($title); ?> </h4> <div class="text-small"><?php echo wp_kses_post($message); ?> <div class="clearfix"></div><br> <?php if (!empty($button_text)) { echo "<a href='" . esc_url($url) . "' class='btn btn-default'>" . esc_html($button_text) . "</a>"; } ?> </div> </div> <?php } elseif ($style == 2) { ?> <div class="big-services-box <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <a href="<?php echo esc_url($url); ?> "> <div class="big-icon border border"> <?php echo $icon; ?> </div> <h4 class="title"><?php echo esc_html($title); ?> </h4> <div class="text-small"><?php echo wp_kses_post($message); ?> </div> </a> </div><!-- .services-box-two --> <?php } elseif ($style == 3) { ?> <div class="service <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <a href="<?php echo esc_url($url); ?> "> <div class="icon border"> <?php echo $icon; ?> </div> <h6 class="title"><?php echo esc_html($title); ?> </h6> <div class="text-small"><?php echo wp_kses_post($message); ?> </div> </a> </div> <?php } elseif ($style == 4) { ?> <div class="big-services-box <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <a href="#"> <div class="big-icon bg" data-animation="fadeInUp"><?php echo $icon; ?> </div> <h4 class="title"><?php echo esc_html($title); ?> </h4> <div class="text-small"><?php echo wp_kses_post($message); ?> </div> </a> </div><!-- .services-box-two --> <?php } elseif ($style == 5) { ?> <div class="service <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="icon bg"> <?php echo $icon; ?> </div> <h6 class="title"><?php echo esc_html($title); ?> </h6> <div class="text-small"> <?php echo wp_kses_post($message); ?> <br><br> <?php if (!empty($button_text)) { echo "<a href='" . esc_url($url) . "' class='btn btn-default'>" . esc_html($button_text) . "</a>"; } ?> </div> </div> <?php } ?> <?php if ($style_color == 'white') { echo '</div>'; } $output = ob_get_contents(); wp_enqueue_script('raphael'); ob_end_clean(); return $output; }
function ts_post_list_func($atts, $content = null) { global $post; extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'category' => '', 'limit' => 1, 'carousel_pagination' => 'yes', 'carousel_navigation' => 'yes', 'image_align' => 'left'), $atts)); if (empty($limit)) { $limit = 1; } $html = ''; $args = array('numberposts' => "", 'posts_per_page' => $limit, 'offset' => 0, 'cat' => $category, 'orderby' => 'date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'paged' => 1, 'post_status' => 'publish'); ob_start(); $the_query = new WP_Query($args); $html = ''; if ($the_query->have_posts()) { while ($the_query->have_posts()) { $the_query->the_post(); $slider = ''; $post_gallery = ts_get_post_opt('post_gallery'); if (is_array($post_gallery) && count($post_gallery) > 0) { foreach ($post_gallery as $slide) { $image = theme_thumb($slide['image'], 370, 270, 'c'); if (!empty($image)) { $slider .= '<img src="' . esc_url($image) . '" alt="" title="" />'; } } } ?> <div class="bottom-padding <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="post carousel row no-responsive"> <div class="images-box col-xs-12 col-sm-4 col-md-4 <?php echo $image_align == 'right' ? 'pull-right' : ''; ?> "> <?php if (!empty($slider)) { ?> <div class="carousel-box load" data-carousel-pagination="<?php echo $carousel_pagination == 'yes' ? 'true' : 'false'; ?> " data-carousel-nav="<?php echo $carousel_navigation == 'yes' ? 'true' : 'false'; ?> " data-carousel-one="true"> <div class="carousel"> <?php echo $slider; ?> </div> <div class="nav-box"> <a class="next" href="#"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"> <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon> </svg> </a> <a class="prev" href="#"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"> <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon> </svg> </a> </div> <div class="clearfix"></div> <div class="pagination switches"></div> </div> <?php } else { ?> <img src="<?php echo esc_url(get_xv_thumbnail(370, 270)); ?> " class="single-image" /> <?php } ?> </div> <div class="col-xs-12 col-sm-8 col-md-8"> <h2 class="entry-title"><a href="<?php echo esc_url(get_the_permalink()); ?> " title="<?php echo esc_attr(get_the_title()); ?> "><?php the_title(); ?> </a></h2> <div class="entry-content"> <?php ts_the_excerpt_theme(155); ?> </div> <div class="entry-meta"> <span class="autor-name"><?php the_author(); ?> </span>, <span class="time"><?php the_time('j.m.Y'); ?> </span> <span class="separator">|</span> <span class="meta"><?php _e('Posted in', 'progressive'); ?> <?php echo get_the_category_list(', '); ?> </span> <span class="comments-link pull-right"> <a href="<?php comments_link(); ?> "><?php comments_number('0', '1', '%'); ?> <?php _e('comment(s)', 'progressive'); ?> </a> </span> </div> </div> <div class="clearfix"></div> </div><!-- .post --> </div> <?php } wp_reset_postdata(); } $html = ob_get_contents(); ob_end_clean(); return $html; }
function ts_services_carousel_func($atts, $content = null) { global $post; extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'limit' => 8, 'width' => 170, 'height' => 170), $atts)); ob_start(); ?> <?php if (empty($title)) { $title_class = ''; } else { $title_class = 'title-box'; } ?> <div class="features-promo carousel-box bottom-padding load overflow <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="<?php echo sanitize_html_class($title_class); ?> "> <a class="next" href="#"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"> <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon> </svg> </a> <a class="prev" href="#"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"> <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon> </svg> </a> <h1 class="title"><?php echo esc_html($title); ?> </h1> </div> <div class="clearfix"></div> <div class="row"> <div class="carousel no-responsive"> <?php query_posts(array('post_type' => 'service', 'posts_per_page' => $limit)); if (have_posts()) { while (have_posts()) { the_post(); $thumb = get_xv_thumbnail($width, $height); $icon = get_post_meta(get_the_ID(), 'xv-simple-icon', TRUE); ?> <div class="text-small features-block col-sm-3 col-md-3"> <div class="header-box"> <div class="icon_box"> <i class="<?php echo esc_attr($icon); ?> "></i> </div> <h6><?php the_title(); ?> </h6> </div> <div><?php the_content(); ?> </div> </div> <?php } } wp_reset_query(); ?> </div> </div> </div><!-- .features-promo --> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function ts_pricing_table_func($atts, $content = null) { //$output = $title = $values = $units = $bgcolor = $custombgcolor = $options = $el_class = ''; extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'subtitle' => 'Starting at', 'price' => '199$', 'duration' => 'monthly', 'livicon' => 'shopping-cart', 'style' => '', 'more_btn' => '', 'more_url' => '', 'stars' => '80', 'table_btn_text' => 'Read More', 'table_btn_url' => '', 'values' => '', 'checked' => ''), $atts)); wp_enqueue_script('waypoints'); $output = ''; $textAr = explode("\n", $values); $textAr = array_filter($textAr, 'trim'); // remove any extra \r characters left behind ob_start(); if ($style == 'info') { $table_style = 'prising-info'; } else { $table_style = 'pricing-' . $style; } ?> <div class='pricing <?php echo sanitize_html_classes($table_style); ?> <?php echo ts_get_animation_class($animation); ?> ' <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class='title'><a href='#'><?php echo esc_html($title); ?> </a></div> <div class='price-box'> <div class='icon pull-right border circle'> <span class="livicon" data-n="<?php echo esc_attr($livicon); ?> " data-s="32" data-c="#1e1e1e" data-hc="0"></span> </div> <div class='starting'><?php echo esc_html($subtitle); ?> </div> <div class='price'><?php echo esc_html($price); ?> <span>/<?php echo esc_html($duration); ?> </span></div> </div> <ul class='options'> <?php if (is_array($textAr)) { foreach ($textAr as $line) { if ($line[0] == '*') { $line = substr($line, 1); echo "<li class='active'><span><i class='icon-check'></i></span>" . wp_kses_post($line) . "</li>"; } else { echo "<li><span><i class='icon-check'></i></span>" . wp_kses_post($line) . "</li>"; } } } ?> </ul> <div class='bottom-box'> <?php if (!empty($more_btn)) { ?> <a href='<?php echo esc_url($more_url); ?> ' class='more'><?php echo esc_html($more_btn); ?> <span class='fa fa-angle-right'></span></a> <?php } ?> <div class='rating-box'> <div style='width: <?php echo esc_attr($stars); ?> %' class='rating'> <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='73px' height='12px' viewBox='0 0 73 12' enable-background='new 0 0 73 12' xml:space='preserve'> <polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='6.5,0 8,5 13,5 9,7.7 10,12 6.5,9.2 3,12 4,7.7 0,5 5,5'></polygon> <polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='66.5,0 68,5 73,5 69,7.7 70,12 66.5,9.2 63,12 64,7.7 60,5 65,5 '></polygon> <polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='21.5,0 23,5 28,5 24,7.7 25,12 21.5,9.2 18,12 19,7.7 15,5 20,5 '></polygon> <polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='51.5,0 53,5 58,5 54,7.7 55,12 51.5,9.2 48,12 49,7.7 45,5 50,5 '></polygon> <polygon fill-rule='evenodd' clip-rule='evenodd' fill='#1e1e1e' points='36.5,0 38,5 43,5 39,7.7 40,12 36.5,9.2 33,12 34,7.7 30,5 35,5 '></polygon> </svg> </div> </div> <?php if (!empty($table_btn_text)) { ?> <a href='<?php echo esc_url($table_btn_url); ?> ' class='btn btn-default btn-lg btn-<?php echo esc_attr($style); ?> '><?php echo esc_html($table_btn_text); ?> </a> <?php } ?> </div> </div><!-- .pricing --> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function xv_gallery_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'limit' => '3', 'category' => '', 'width' => '', 'height' => '', 'style' => ''), $atts)); global $post; ob_start(); if ($style == 'small') { $width = 270; $height = 135; $col = 'col-sm-4 col-md-3'; } else { $width = 270; $height = 135; $col = 'col-sm-4 col-md-4'; } $current_animation_delay = $animation_delay; ?> <div class="bottom-padding load"> <div class="clearfix"></div> <div class="row"> <div class="no-responsive gallery"> <?php $wp_query = new WP_Query(); $args = array('numberposts' => '', 'posts_per_page' => $posts_per_page, 'offset' => 0, 'gallery_category' => $category, 'orderby' => 'date', 'order' => 'ASC', 'post_type' => 'gallery', 'post_status' => 'publish'); $wp_query->query($args); if ($wp_query->have_posts()) { while ($wp_query->have_posts()) { $wp_query->the_post(); $thumb = get_xv_thumbnail($width, $height); if (has_post_thumbnail()) { $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full"); $image_url = ''; if (isset($image_src[0])) { $image_url = $image_src[0]; } // $thumb = theme_thumb($image_url, $width, $height, 'c'); } else { $image_url = get_xv_thumbnail(600, 600); } ?> <div class="<?php echo esc_attr($col); ?> <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($current_animation_delay, $animation_iteration); ?> > <a class="gallery-images" rel="fancybox" href="<?php echo esc_url($image_url); ?> "> <img src="<?php echo esc_url($thumb); ?> " alt=""> <span class="bg-images"><i class="icon-search"></i></span> </a> </div> <?php $current_animation_delay += $animation_delay_item; } } wp_reset_postdata(); ?> </div> </div> </div> <?php wp_enqueue_script('fancybox'); $output = ob_get_contents(); ob_end_clean(); return $output; }
function xv_gallery_carousel_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'category' => '', 'title' => '', 'height' => '', 'style' => ''), $atts)); ob_start(); ?> <?php $terms = get_terms("gallery_category"); $count = count($terms); if (empty($title)) { $title_class = ''; } else { $title_class = 'title-box'; } ?> <div class="carousel-box load overflow <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="title-box"> <a class="next" href="#"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"> <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "></polygon> </svg> </a> <a class="prev" href="#"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"> <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "></polygon> </svg> </a> <?php if (!empty($title)) { ?> <h2 class="title"><?php echo esc_html($title); ?> </h2> <?php } ?> </div> <div class="clearfix"></div> <div class="row"> <div class="carousel gallery"> <?php $terms = get_terms("gallery_category"); $count = count($terms); $post_per_page = 2; global $post; $adcount = 1; query_posts(array('post_type' => 'gallery', 'gallery_category' => $category, 'orderby' => 'date', 'order' => 'ASC')); if (have_posts()) { while (have_posts()) { the_post(); $thumb = get_xv_thumbnail(270, 135); if (has_post_thumbnail()) { $image_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full"); $image_url = ''; if (isset($image_src[0])) { $image_url = $image_src[0]; } // $thumb = theme_thumb($image_url, $width, $height, 'c'); } else { $image_url = get_xv_thumbnail(600, 600); } ?> <div class="col-sm-4 col-md-3"> <a class="gallery-images" rel="fancybox" href="<?php echo esc_url($image_url); ?> "> <img src="<?php echo esc_url($thumb); ?> " alt=""> <span class="bg-images"><i class="icon-search-1"></i></span> </a> </div> <?php } } wp_reset_query(); ?> </div> </div> </div> <?php wp_enqueue_script('fancybox'); $output = ob_get_contents(); ob_end_clean(); return $output; }
function recent_posts2_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'title' => '', 'style' => '', 'count' => '4', 'length' => '125', 'blog_text' => '', 'blog_url' => ''), $atts)); ob_start(); ?> <?php if (!empty($title)) { $t_class = 'title-box'; } else { $t_class = ''; } $current_animation_delay = $animation_delay; ?> <div class="news <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <div class="<?php echo esc_attr($t_class); ?> "> <?php if (!empty($blog_text)) { ?> <a href="<?php echo esc_url($blog_url); ?> " class="btn btn-default"><?php echo esc_html($blog_text); ?> <span class="glyphicon glyphicon-arrow-right"></span></a> <?php } ?> <h2 class="title"><?php echo esc_html($title); ?> </h2> </div> <div class="row"> <?php $current_animation_delay += $animation_delay_item; query_posts(array('post_type' => 'post', 'posts_per_page' => $count)); if (have_posts()) { while (have_posts()) { the_post(); $thumb = get_xv_thumbnail(84, 84); $excerpt = get_xv_excerpt($length); ?> <div class="news-item col-sm-12 <?php echo esc_attr($style); ?> <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($current_animation_delay, $animation_iteration); ?> > <div class="time"><?php the_time('j.m.Y'); ?> </div> <h3 class="title"><a href="<?php echo esc_url(get_the_permalink()); ?> "><?php the_title(); ?> </a></h3> <div class="news-body"><?php echo wp_kses_post($excerpt); ?> </div> <a href="<?php echo esc_url(get_the_permalink()); ?> " class="more"><?php _e('Read more', 'progressive'); ?> <span class="fa fa-angle-right"></span></a> </div><!-- .news-item --> <?php } } wp_reset_query(); ?> </div> </div><!-- .news --> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function ts_contact_form_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_iteration' => '', 'title' => '', 'email' => '', 'email_label' => '', 'email_icon' => '', 'message_label' => '', 'send_label' => '', 'clear_label' => '', 'skin' => 1, 'button_align' => 'left'), $atts)); ob_start(); $action = admin_url('admin-ajax.php'); $your_email = $email; ?> <div class="contact_wraper <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <form method="POST" data-action="<?php echo esc_url($action); ?> " class="form-box register-form contact-form" id="contactform"> <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('my-contact-form'); ?> " /> <h3 class="title"><?php echo esc_html($title); ?> </h3> <div id="success"></div> <label><?php _e('Name', 'progressive'); ?> : <span class="required">*</span></label> <input id="cf_name" type="text" name="name" class="form-control"> <label><?php _e('Email Address:', 'progressive'); ?> <span class="required">*</span></label> <input id="cf_email" type="email" name="email" class="form-control"> <label><?php _e('Telephone:', 'progressive'); ?> </label> <input id="cf_phone" type="text" name="phone" class="form-control"> <label><?php _e('Comment:', 'progressive'); ?> </label> <textarea id="cf_message" name="comment" class="form-control"></textarea> <div class="clearfix"></div> <div class="buttons-box clearfix"> <input type="hidden" name="your_email" id="your_email" value="<?php echo esc_attr(get_the_ID()); ?> " /> <button class="btn btn-default" id="submit"><?php _e('Submit', 'progressive'); ?> </button> <span class="required"><b>*</b> <?php _e('Required Field', 'progressive'); ?> </span> </div><!-- .buttons-box --> </form> <div id="valid-issue" style="display:none;"> <?php _e('Please Provide Valid Information', 'progressive'); ?> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function ts_workflow_func($atts, $content = null) { global $post; extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'title' => '', 'animation' => '', 'limit' => 5), $atts)); ob_start(); $current_animation_delay = $animation_delay; ?> <div class="bottom-padding <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($animation_delay, $animation_iteration); ?> > <?php if (!empty($title)) { ?> <div class="title-box text-center"> <h1 class="title"><?php echo esc_html($title); ?> </h1> </div> <?php } ?> <div class="steps"> <?php query_posts(array('post_type' => 'workflow', 'posts_per_page' => $limit)); if (have_posts()) { while (have_posts()) { the_post(); $icon = get_post_meta(get_the_ID(), 'xv_workflow_icon', TRUE); $style = get_post_meta(get_the_ID(), 'xv_workflow_style', TRUE); ?> <div class="step text-center white <?php echo sanitize_html_classes($style); ?> "> <div class="step-wrapper"> <span class="livicon" data-n="<?php echo esc_attr($icon); ?> " data-s="48" data-c="#fff" data-hc="#f6f5f5"></span> <div class="title-box text-center title-white"> <h4 class="title"><?php the_title(); ?> </h4> </div> <p><?php the_content(); ?> </p> </div> </div> <?php } } wp_reset_query(); ?> </div> <div class="clearfix"></div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }
function woo_products_2_func($atts, $content = null) { extract(shortcode_atts(array('animation' => '', 'animation_delay' => '', 'animation_delay_item' => '', 'animation_iteration' => '', 'orderby' => '', 'limit' => '', 'show' => '', 'order' => ''), $atts)); if (!class_exists('woocommerce')) { return ''; } ob_start(); global $post; $query_args = array('posts_per_page' => $limit, 'post_status' => 'publish', 'post_type' => 'product', 'no_found_rows' => 1, 'order' => $order == 'asc' ? 'asc' : 'desc'); $query_args['meta_query'] = array(); $query_args['meta_query'][] = WC()->query->stock_status_meta_query(); $query_args['meta_query'] = array_filter($query_args['meta_query']); switch ($show) { case 'featured': $query_args['meta_query'][] = array('key' => '_featured', 'value' => 'yes'); break; case 'onsale': $product_ids_on_sale = wc_get_product_ids_on_sale(); $product_ids_on_sale[] = 0; $query_args['post__in'] = $product_ids_on_sale; break; } switch ($orderby) { case 'price': $query_args['meta_key'] = '_price'; $query_args['orderby'] = 'meta_value_num'; break; case 'rand': $query_args['orderby'] = 'rand'; break; case 'sales': $query_args['meta_key'] = 'total_sales'; $query_args['orderby'] = 'meta_value_num'; break; default: $query_args['orderby'] = 'date'; } $current_animation_delay = $animation_delay; ?> <div class="bottom-padding"> <div class="row text-center"> <?php $j = 1; $k = 1; $loop = new WP_Query($query_args); if ($loop->have_posts()) { while ($loop->have_posts()) { $loop->the_post(); $temp = 1; $product = new WC_Product(get_the_ID()); ?> <div class="col-sm-3 col-md-3 product product-centered <?php echo ts_get_animation_class($animation); ?> " <?php echo ts_get_animation_data_class($current_animation_delay, $animation_iteration); ?> > <div class="default"> <?php if ($product->is_on_sale()) { ?> <?php echo apply_filters('woocommerce_sale_flash', '<span class="sale-custome"></span>', $post, $product); ?> <?php } ?> <a href="<?php echo esc_url(get_the_permalink()); ?> " class="product-image"> <img src="<?php echo esc_url(get_xv_thumbnail(270, 270)); ?> " /> </a> <div class="actions not-rotation-actions"> <?php wc_get_template('/loop/add-to-cart.php'); ?> <?php if (class_exists('YITH_WCWL')) { echo do_shortcode('[yith_wcwl_add_to_wishlist]'); } ?> <a href="<?php echo esc_url(get_the_permalink()); ?> " class="add-compare"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> <path fill="#1e1e1e" d="M16,3.063L13,0v2H1C0.447,2,0,2.447,0,3s0.447,1,1,1h12v2L16,3.063z"></path> <path fill="#1e1e1e" d="M16,13.063L13,10v2H1c-0.553,0-1,0.447-1,1s0.447,1,1,1h12v2L16,13.063z"></path> <path fill="#1e1e1e" d="M15,7H3V5L0,7.938L3,11V9h12c0.553,0,1-0.447,1-1S15.553,7,15,7z"></path> </svg> </a> </div> <div class="product-description"> <div class="vertical"> <h3 class="product-name"> <a href="<?php echo esc_url(get_the_permalink()); ?> "><?php the_title(); ?> </a> </h3> <div class="price"><?php echo $product->get_price_html(); ?> </div> </div> </div> </div> </div><!-- .product --> <?php $current_animation_delay += $animation_delay_item; $k++; } } else { echo __('No products found', 'progressive'); } wp_reset_postdata(); ?> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; }