function testimonial($atts, $content) { extract(shortcode_atts(array('style' => 'style1', 'slug' => '', 'id' => 0), $atts)); $_actived = apply_filters('active_plugins', get_option('active_plugins')); if (!in_array("testimonials-by-woothemes/woothemes-testimonials.php", $_actived)) { return; } global $post; $count = 0; if (absint($id) > 0) { $_feature = woothemes_get_testimonials(array('id' => $id, 'limit' => 1)); } elseif (strlen(trim($slug)) > 0) { $_feature = get_page_by_path($slug, OBJECT, 'testimonial'); if (!is_null($_feature)) { $_feature = woothemes_get_testimonials(array('id' => $_feature->ID, 'limit' => 1)); } else { return; } } else { return; //invalid input params. } if (!is_array($_feature) && count($_feature) <= 0) { return; } else { global $post; $_feature = $_feature[0]; $post = $_feature; setup_postdata($post); } $arr_style = array('style1', 'style2', 'style3', 'style4'); if (!in_array($style, $arr_style)) { $style = 'style1'; } ob_start(); if ($style == 'style3' || $style == 'style4') { ?> <div class="testimonial-item testimonial <?php echo $style; ?> "> <div class="detail"> <div class="testimonial-content"><?php the_content(); ?> </div> <div class="twitter_follow"><a class="first" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">Follow</a> <a class="second" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">@<?php echo get_post_meta($post->ID, THEME_SLUG . 'username_twitter_testimonial', true); ?> </a></div> </div> <div class="avartar"> <a href="#"><?php the_post_thumbnail('woo_shortcode'); ?> </a> <h3><?php the_title(); ?> <span class="job"> / <?php echo get_post_meta($post->ID, '_byline', true); ?> </span></h3> </div> </div> <?php } else { ?> <div class="testimonial-item testimonial <?php echo $style; ?> "> <div class="avartar"> <a href="#"><?php the_post_thumbnail('woo_shortcode'); ?> </a> </div> <div class="detail"> <h3><?php the_title(); ?> <span class="job"> / <?php echo get_post_meta($post->ID, '_byline', true); ?> </span></h3> <div class="testimonial-content"><?php the_content(); ?> </div> <div class="twitter_follow"><a class="first" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">Follow</a> <a class="second" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">@<?php echo get_post_meta($post->ID, THEME_SLUG . 'username_twitter_testimonial', true); ?> </a></div> </div> </div> <?php } ?> <?php $output = ob_get_contents(); ob_end_clean(); rewind_posts(); wp_reset_query(); return $output; }
/** * Display or return HTML-formatted testimonials. * @param string/array $args Arguments. * @since 1.0.0 * @return string */ function woothemes_testimonials($args = '') { global $post; $defaults = apply_filters('woothemes_testimonials_default_args', array('limit' => 5, 'per_row' => null, 'orderby' => 'menu_order', 'order' => 'DESC', 'id' => 0, 'display_author' => true, 'display_avatar' => true, 'display_url' => true, 'effect' => 'fade', 'pagination' => false, 'echo' => true, 'size' => 50, 'title' => '', 'before' => '<div class="widget widget_woothemes_testimonials">', 'after' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>', 'category' => 0)); $args = wp_parse_args($args, $defaults); // Allow child themes/plugins to filter here. $args = apply_filters('woothemes_testimonials_args', $args); $html = ''; do_action('woothemes_testimonials_before', $args); // The Query. $query = woothemes_get_testimonials($args); // The Display. if (!is_wp_error($query) && is_array($query) && count($query) > 0) { $class = ''; if (is_numeric($args['per_row'])) { $class .= ' columns-' . intval($args['per_row']); } if ('none' != $args['effect']) { $class .= ' effect-' . $args['effect']; } $html .= $args['before'] . "\n"; if ('' != $args['title']) { $html .= $args['before_title'] . esc_html($args['title']) . $args['after_title'] . "\n"; } $html .= '<div class="testimonials component' . esc_attr($class) . '">' . "\n"; $html .= '<div class="testimonials-list">' . "\n"; // Begin templating logic. $tpl = '<div id="quote-%%ID%%" class="%%CLASS%%" itemprop="review" itemscope itemtype="http://schema.org/Review"><blockquote class="testimonials-text" itemprop="reviewBody">%%TEXT%%</blockquote>%%AVATAR%% %%AUTHOR%%</div>'; $tpl = apply_filters('woothemes_testimonials_item_template', $tpl, $args); $count = 0; foreach ($query as $post) { $count++; $template = $tpl; $css_class = 'quote'; if (is_numeric($args['per_row']) && 0 == ($count - 1) % $args['per_row'] || 1 == $count) { $css_class .= ' first'; } if (is_numeric($args['per_row']) && 0 == $count % $args['per_row'] || count($query) == $count) { $css_class .= ' last'; } // Add a CSS class if no image is available. if (isset($post->image) && '' == $post->image) { $css_class .= ' no-image'; } setup_postdata($post); $author = ''; $author_text = ''; // If we need to display the author, get the data. if (get_the_title($post) != '' && true == $args['display_author']) { $author .= '<cite class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">'; $author_name = '<span itemprop="name">' . get_the_title($post) . '</span>'; $author .= $author_name; if (isset($post->byline) && '' != $post->byline) { $author .= ' <span class="title" itemprop="jobTitle">' . $post->byline . '</span><!--/.title-->' . "\n"; } if (true == $args['display_url'] && '' != $post->url) { $author .= ' <span class="url"><a href="' . esc_url($post->url) . '" itemprop="url">' . apply_filters('woothemes_testimonials_author_link_text', $text = esc_url($post->url)) . '</a></span><!--/.excerpt-->' . "\n"; } $author .= '</cite><!--/.author-->' . "\n"; // Templating engine replacement. $template = str_replace('%%AUTHOR%%', $author, $template); } else { $template = str_replace('%%AUTHOR%%', '', $template); } // Templating logic replacement. $template = str_replace('%%ID%%', get_the_ID(), $template); $template = str_replace('%%CLASS%%', esc_attr($css_class), $template); if (isset($post->image) && '' != $post->image && true == $args['display_avatar']) { $template = str_replace('%%AVATAR%%', '<a href="' . esc_url($post->url) . '" class="avatar-link">' . $post->image . '</a>', $template); } else { $template = str_replace('%%AVATAR%%', '', $template); } // Remove any remaining %%AVATAR%% template tags. $template = str_replace('%%AVATAR%%', '', $template); $content = apply_filters('woothemes_testimonials_content', get_the_content(), $post); $template = str_replace('%%TEXT%%', $content, $template); // Assign for output. $html .= $template; if (is_numeric($args['per_row']) && 0 == $count % $args['per_row']) { $html .= '<div class="fix"></div>' . "\n"; } } wp_reset_postdata(); $html .= '</div><!--/.testimonials-list-->' . "\n"; if ($args['pagination'] == true && count($query) > 1 && $args['effect'] != 'none') { $html .= '<div class="pagination">' . "\n"; $html .= '<a href="#" class="btn-prev">' . apply_filters('woothemes_testimonials_prev_btn', '← ' . __('Previous', 'woothemes-testimonials')) . '</a>' . "\n"; $html .= '<a href="#" class="btn-next">' . apply_filters('woothemes_testimonials_next_btn', __('Next', 'woothemes-testimonials') . ' →') . '</a>' . "\n"; $html .= '</div><!--/.pagination-->' . "\n"; } $html .= '<div class="fix"></div>' . "\n"; $html .= '</div><!--/.testimonials-->' . "\n"; $html .= $args['after'] . "\n"; } // Allow child themes/plugins to filter here. $html = apply_filters('woothemes_testimonials_html', $html, $query, $args); if ($args['echo'] != true) { return $html; } // Should only run is "echo" is set to true. echo $html; do_action('woothemes_testimonials_after', $args); // Only if "echo" is set to true. }
<?php // **********************************************************************// // ! Register New Element: WD Testimonial // **********************************************************************// // ! File Security Check if (!defined('ABSPATH')) { exit; } // **********************************************************************// // ! Register New Element: WD Testimonial // **********************************************************************// $is_woo_testimonial = true; $_actived = apply_filters('active_plugins', get_option('active_plugins')); if (!in_array("testimonials-by-woothemes/woothemes-testimonials.php", $_actived)) { $is_woo_testimonial = false; } if ($is_woo_testimonial) { $testimonials = woothemes_get_testimonials(array('limit' => -1)); $list_testimonials = array(); if ($testimonials) { foreach ($testimonials as $testimonial) { $list_testimonials[$testimonial->post_title] = $testimonial->ID; } } $testimonial_params = array("name" => "Testimonial", "base" => "wd_testimonial", "icon" => "icon-wpb-wpdance", "category" => "WPDance Elements", "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Style", "wpdance"), "admin_label" => true, "param_name" => "style", "value" => array("Style 1" => "style-1", "Style 2" => "style-2"), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Testimonial", "wpdance"), "admin_label" => true, "param_name" => "id", "value" => $list_testimonials, "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => __("Background", "wpdance"), "admin_label" => true, "param_name" => "background", "value" => "#ffffff", "description" => ""))); vc_map($testimonial_params); /* Testimonial Slider */ $testimonial_slider_params = array("name" => "Testimonial Slider", "base" => "wd_testimonial_slider", "icon" => "icon-wpb-wpdance", "category" => "WPDance Elements", "params" => array(array("type" => "dropdown", "class" => "", "heading" => __("Style", "wpdance"), "admin_label" => true, "param_name" => "style", "value" => array("Style 1" => "style-1", "Style 2" => "style-2"), "description" => ""), array("type" => "textfield", "class" => "", "heading" => __("Limit", "wpdance"), "admin_label" => true, "param_name" => "limit", "value" => 2, "description" => ""), array("type" => "colorpicker", "class" => "", "heading" => __("Background", "wpdance"), "admin_label" => true, "param_name" => "background", "value" => "#ffffff", "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Show navigation buttons", "wpdance"), "admin_label" => true, "param_name" => "show_nav", "value" => array("No" => 0, "Yes" => 1), "description" => ""), array("type" => "dropdown", "class" => "", "heading" => __("Show pagination buttons", "wpdance"), "admin_label" => true, "param_name" => "show_pagination", "value" => array("No" => 0, "Yes" => 1), "description" => ""))); vc_map($testimonial_slider_params); }
/** * Display or return HTML-formatted testimonials. * @param string/array $args Arguments. * @since 1.0.0 * @return string */ function woothemes_testimonials($args = '') { global $post; $defaults = array('limit' => 5, 'orderby' => 'menu_order', 'interval' => 10000, 'order' => 'DESC', 'id' => 0, 'display_author' => true, 'display_avatar' => true, 'display_url' => true, 'pagination' => false, 'echo' => true, 'size' => 50, 'title' => '', 'before' => '', 'after' => '', 'before_title' => '', 'after_title' => '', 'category' => 0); $args = wp_parse_args($args, $defaults); // Allow child themes/plugins to filter here. $args = apply_filters('woothemes_testimonials_args', $args); $html = ''; do_action('woothemes_testimonials_before', $args); // The Query. $query = woothemes_get_testimonials($args); // The Display. if (!is_wp_error($query) && is_array($query) && count($query) > 0) { $html .= $args['before'] . "\n"; if ('' != $args['title']) { $html .= $args['before_title'] . esc_html($args['title']) . $args['after_title'] . "\n"; } $html .= '<div class="cbp-qtrotator testimonials testimonials-slider" data-interval="' . $args['interval'] . '" >' . "\n"; // Begin templating logic. $tpl = '<div id="quote-%%ID%%" class="cbp-qtcontent %%CLASS%%">%%AVATAR%%<blockquote class="testimonials-text">%%TEXT%% <footer>%%AUTHOR%%</footer></blockquote> <div class="clear"></div></div>'; $tpl = apply_filters('woothemes_testimonials_item_template', $tpl, $args); $count = 0; foreach ($query as $post) { $count++; $template = $tpl; $css_class = 'quote'; if (1 == $count) { $css_class .= ' first'; } if (count($query) == $count) { $css_class .= ' last'; } setup_postdata($post); $author = ''; $author_text = ''; // If we need to display the author, get the data. if (get_the_title($post) != '' && true == $args['display_author']) { $author .= '<cite class="author">'; $author_name = get_the_title($post); $author .= '<strong>' . $author_name . '</strong>'; if (isset($post->byline) && '' != $post->byline) { $author .= ' <span class="excerpt">' . $post->byline . '</span><!--/.excerpt-->' . "\n"; } if (true == $args['display_url'] && '' != $post->url) { $author .= ' <span class="url"><a href="' . esc_url($post->url) . '">' . $post->url . '</a></span><!--/.excerpt-->' . "\n"; } $author .= '</cite><!--/.author-->' . "\n"; // Templating engine replacement. $template = str_replace('%%AUTHOR%%', $author, $template); } else { $template = str_replace('%%AUTHOR%%', '', $template); } // Templating logic replacement. $template = str_replace('%%ID%%', get_the_ID(), $template); $template = str_replace('%%CLASS%%', esc_attr($css_class), $template); if (isset($post->image) && '' != $post->image && true == $args['display_avatar']) { $template = str_replace('%%AVATAR%%', '<a class="avatar-link">' . $post->image . '</a>', $template); } else { $template = str_replace('%%AVATAR%%', '', $template); } // Remove any remaining %%AVATAR%% template tags. $template = str_replace('%%AVATAR%%', '', $template); $content = apply_filters('woothemes_testimonials_content', get_the_content(), $post); $template = str_replace('%%TEXT%%', $content, $template); // Assign for output. $html .= $template; } wp_reset_postdata(); if ($args['pagination'] == true && count($query) > 1 && $args['effect'] != 'none') { $html .= '<div class="pagination">' . "\n"; $html .= '<a href="#" class="btn-prev">' . apply_filters('woothemes_testimonials_prev_btn', '← ' . __('Previous', ETHEME_DOMAIN)) . '</a>' . "\n"; $html .= '<a href="#" class="btn-next">' . apply_filters('woothemes_testimonials_next_btn', __('Next', ETHEME_DOMAIN) . ' →') . '</a>' . "\n"; $html .= '</div><!--/.pagination-->' . "\n"; } $html .= '<div class="fix"></div>' . "\n"; $html .= '</div><!--/.testimonials-->' . "\n"; $html .= $args['after'] . "\n"; } // Allow child themes/plugins to filter here. $html = apply_filters('woothemes_testimonials_html', $html, $query, $args); if ($args['echo'] != true) { return $html; } // Should only run is "echo" is set to true. echo $html; do_action('woothemes_testimonials_after', $args); // Only if "echo" is set to true. }
public static function testimonials($atts) { $atts = shortcode_atts(array("title" => '', "ids" => ''), $atts); if (strlen(trim($atts['ids'])) == 0) { return ''; } $nth_testimonials = woothemes_get_testimonials(array('id' => $atts['ids'], 'limit' => 10, 'size' => 'thumbnail')); ob_start(); if (!empty($nth_testimonials) && count($nth_testimonials) > 0) { $atts['nth_testimonials'] = $nth_testimonials; parent::get_template("shortcode-testimonials.tpl.php", $atts); } //rewind_posts(); //wp_reset_query(); wp_reset_postdata(); return '<div class="nth-shortcode nth_' . __FUNCTION__ . '">' . ob_get_clean() . '</div>'; }
if ('' != $settings['homepage_testimonials_title']) { ?> <h1><?php echo stripslashes(esc_html($settings['homepage_testimonials_title'])); ?> </h1><?php } ?> </header> <?php } ?> <?php $args = array('limit' => intval($settings['homepage_testimonials_number']), 'size' => 65); $testimonials = woothemes_get_testimonials($args); if (!empty($testimonials)) { ?> <div class="slide-nav"> <ul> <?php foreach ($testimonials as $testimonial) { ?> <li> <a href="#" class="avatar-link"><?php echo $testimonial->image; ?> </a> </li> <?php
function wd_testimonial_function($atts, $content) { extract(shortcode_atts(array('slug' => '', 'id' => 0, 'style' => 'style-1', 'background' => ''), $atts)); $_actived = apply_filters('active_plugins', get_option('active_plugins')); if (!in_array("testimonials-by-woothemes/woothemes-testimonials.php", $_actived)) { return; } global $post; $count = 0; if (absint($id) > 0) { $_feature = woothemes_get_testimonials(array('id' => $id, 'limit' => 1)); } elseif (strlen(trim($slug)) > 0) { $_feature = get_page_by_path($slug, OBJECT, 'testimonial'); if (!is_null($_feature)) { $_feature = woothemes_get_testimonials(array('id' => $_feature->ID, 'limit' => 1)); } else { return; } } else { return; //invalid input params. } if (!is_array($_feature) && count($_feature) <= 0) { return; } else { global $post; $_feature = $_feature[0]; $post = $_feature; setup_postdata($post); } ob_start(); ?> <?php if ($style == "style-1") { ?> <div class="testimonial-item testimonial <?php echo $style; ?> " style="background:<?php echo $background; ?> "> <blockquote class="testimonial-content"><span class="icon-quote">“</span><?php echo get_the_content(); ?> <span class="icon-quote-right">”</span></blockquote> <div class="avartar"> <a href="#"><?php the_post_thumbnail('woo_shortcode'); ?> </a> </div> <div class="detail"> <header> <h3 class="bold-upper-big"><?php the_title(); ?> </h3> <div class="job"><i><?php echo get_post_meta($post->ID, '_byline', true); ?> </i></div> </header> <!--<div class="twitter_follow"><a class="first" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">Follow</a> <a class="second" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">@<?php echo get_post_meta($post->ID, THEME_SLUG . 'username_twitter_testimonial', true); ?> </a></div>--> </div> </div> <?php } elseif ($style == "style-2") { ?> <div class="testimonial-item testimonial <?php echo $style; ?> " style="background:<?php echo $background; ?> "> <div class="detail"> <header> <h3 class="bold-upper-big"><?php the_title(); ?> </h3> <div class="job"><i><?php echo get_post_meta($post->ID, '_byline', true); ?> </i></div> </header> <!--<div class="twitter_follow"><a class="first" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">Follow</a> <a class="second" href="<?php echo get_post_meta($post->ID, '_url', true); ?> ">@<?php echo get_post_meta($post->ID, THEME_SLUG . 'username_twitter_testimonial', true); ?> </a></div>--> </div> <blockquote class="testimonial-content"><span class="icon-quote">“</span><?php echo get_the_content(); ?> <span class="icon-quote-right">”</span></blockquote> <div class="avartar"> <a href="#"><?php the_post_thumbnail('woo_shortcode'); ?> </a> </div> </div> <?php } ?> <?php $output = ob_get_contents(); ob_end_clean(); wp_reset_postdata(); return $output; }
/** * Display or return HTML-formatted testimonials. * @param string/array $args Arguments. * @since 1.0.0 * @return string */ function woothemes_testimonials($args = '') { global $post; $defaults = array('limit' => 5, 'orderby' => 'menu_order', 'interval' => 10000, 'order' => 'DESC', 'id' => 0, 'display_author' => true, 'display_avatar' => true, 'display_url' => true, 'navigation' => false, 'echo' => true, 'size' => 50, 'title' => '', 'before' => '', 'after' => '', 'before_title' => '', 'after_title' => '', 'type' => 'slider', 'columns' => 2, 'navigation' => false, 'category' => 0); $img_size = 40; $args = wp_parse_args($args, $defaults); // Allow child themes/plugins to filter here. $args = apply_filters('woothemes_testimonials_args', $args); $html = ''; do_action('woothemes_testimonials_before', $args); // The Query. $query = woothemes_get_testimonials($args); $class = 'cbp-qtrotator'; $box_id = rand(1000, 9999); if ($args['type'] == 'slider') { $class = 'owl-carousel testimonials-slider'; } elseif ($args['type'] == 'grid') { $img_size = 120; $class = 'testimonial-grid'; } // The Display. if (!is_wp_error($query) && is_array($query) && count($query) > 0) { $html .= $args['before'] . "\n"; if ('' != $args['title']) { $html .= $args['before_title'] . esc_html($args['title']) . $args['after_title'] . "\n"; } $html .= '<div id="owl-testimonials" class="' . $class . ' testimonials slider-' . $box_id . '" data-interval="' . $args['interval'] . '" >' . "\n"; // Begin templating logic. if ($args['type'] == 'slider') { $tpl = '<div id="quote-%%ID%%" class="item %%CLASS%%"><blockquote class="testimonials-text">%%TEXT%%</blockquote> %%AVATAR%% <div class="testimonial-author">%%AUTHOR%%</div> <div class="clear"></div></div>'; } elseif ($args['type'] == 'grid') { $tpl = '<div id="quote-%%ID%%" class="item %%CLASS%%"> %%AVATAR%% <blockquote class="testimonials-text">%%TEXT%%</blockquote> <div class="testimonial-author">%%AUTHOR%%</div> <div class="clear"></div></div>'; } $tpl = apply_filters('woothemes_testimonials_item_template', $tpl, $args); $count = 0; if ($args['type'] == 'grid') { $html .= '<div class="testimonials-row">'; } foreach ($query as $post) { $count++; $template = $tpl; $css_class = 'quote'; if (1 == $count) { $css_class .= ' first'; } if (count($query) == $count) { $css_class .= ' last'; } setup_postdata($post); $author = ''; $author_text = ''; // If we need to display the author, get the data. if (get_the_title($post) != '' && true == $args['display_author']) { $author .= '<cite class="author">'; $author_name = get_the_title($post); $author .= '<strong>' . $author_name . '</strong>'; if (isset($post->byline) && '' != $post->byline) { $author .= ' <span class="excerpt">' . $post->byline . '</span><!--/.excerpt-->' . "\n"; } if (true == $args['display_url'] && '' != $post->url) { $author .= ' <span class="url"><a href="' . esc_url($post->url) . '">' . $post->url . '</a></span><!--/.excerpt-->' . "\n"; } $author .= '</cite><!--/.author-->' . "\n"; // Templating engine replacement. $template = str_replace('%%AUTHOR%%', $author, $template); } else { $template = str_replace('%%AUTHOR%%', '', $template); } // Templating logic replacement. $template = str_replace('%%ID%%', get_the_ID(), $template); $template = str_replace('%%CLASS%%', esc_attr($css_class), $template); if (isset($post->image) && '' != $post->image && true == $args['display_avatar']) { $image = '<img src="' . etheme_get_image(false, $img_size, $img_size) . '">'; $template = str_replace('%%AVATAR%%', '<a class="avatar-link">' . $image . '</a>', $template); } else { $template = str_replace('%%AVATAR%%', '', $template); } // Remove any remaining %%AVATAR%% template tags. $template = str_replace('%%AVATAR%%', '', $template); $content = apply_filters('woothemes_testimonials_content', get_the_content(), $post); $template = str_replace('%%TEXT%%', $content, $template); // Assign for output. $html .= $template; if ($count % $args['columns'] == 0 && count($query) != $count && $args['type'] == 'grid') { $html .= '<div class="clear"></div></div><div class="testimonials-row">'; } } if ($args['type'] == 'grid') { $html .= '<div class="clear"></div></div><!--testimonials-row-->'; } wp_reset_postdata(); /*if ( $args['navigation'] != 'hide' && count( $query ) > 1 && $args['effect'] != 'none' ) { $html .= '<div class="pagination">' . "\n"; $html .= '<a href="#" class="btn-prev">' . apply_filters( 'woothemes_testimonials_prev_btn', '← ' . __( 'Previous', ETHEME_DOMAIN ) ) . '</a>' . "\n"; $html .= '<a href="#" class="btn-next">' . apply_filters( 'woothemes_testimonials_next_btn', __( 'Next', ETHEME_DOMAIN ) . ' →' ) . '</a>' . "\n"; $html .= '</div><!--/.pagination-->' . "\n"; }*/ $html .= '</div><!--/.testimonials-->' . "\n"; if ($args['type'] == 'slider') { $html .= '<script type="text/javascript">'; $html .= 'jQuery(".slider-' . $box_id . '").owlCarousel({'; $html .= 'items:1,'; $html .= 'lazyLoad : true,'; $html .= 'autoPlay: ' . $args['interval'] . ','; if ($args['navigation'] != 'hide') { $html .= 'navigation: true,'; $html .= 'navigationText:false,'; } $html .= 'rewindNav: true,'; $html .= 'itemsCustom: [[0, 1], [479,1], [619,1], [768,1], [1200, 1], [1600, 1]]'; $html .= '});'; $html .= '</script>'; } $html .= $args['after'] . "\n"; } // Allow child themes/plugins to filter here. $html = apply_filters('woothemes_testimonials_html', $html, $query, $args); if ($args['echo'] != true) { return $html; } // Should only run is "echo" is set to true. echo $html; do_action('woothemes_testimonials_after', $args); // Only if "echo" is set to true. }