PATH:
home
/
letacommog
/
supportleta
/
wp-content
/
plugins
/
webnus-shortcodes
/
shortcodes
<?php function easyweb_webnus_testimonial_carousel( $atts, $content = null ) { extract(shortcode_atts(array( 'testimonial_item' => '', 'items' => '', ), $atts)); // testimonial_item loop $testimonial_item = (array) vc_param_group_parse_atts( $testimonial_item ); $testimonial_item_data = array(); foreach ( $testimonial_item as $data ) : if( isset( $data['img'] ) && is_numeric( $data['img'] ) ) $data['img'] = wp_get_attachment_url( $data['img'] ); $new_line = $data; $new_line['img'] = isset( $data['img'] ) ? '<img src="' . esc_url( $data['img'] ) . '" alt="' . $data['name'] . '">' : ''; $new_line['tc_content'] = isset( $data['tc_content'] ) ? '<p class="tc-content">' . esc_html( $data['tc_content'] ) . '</p>' : ''; $new_line['name'] = isset( $data['name'] ) ? '<p class="tc-name">' . esc_html( $data['name'] ) . '</p>' : ''; $new_line['job'] = isset( $data['job'] ) ? '<p class="tc-job">' . esc_html( $data['job'] ) . '</p>' : ''; $testimonial_item_data[]= $new_line; endforeach; $items = $items ? intval( $items ) : '3'; // render $out = '<div class="testimonial-carousel">'; $out .= '<div class="testimonial-owl-carousel owl-carousel owl-theme" data-testimonial_count="' . $items . '">'; foreach ( $testimonial_item_data as $line ) : $out .= '<div class="tc-item">' . $line['img'] . $line['tc_content'] . $line['name'] . $line['job'] . '</div>'; endforeach; $out .= '</div>'; // pagination $out .= ' <div class="tc-navigation"> <a class="btn prev"><i class="fa-angle-left"></i></a> <a class="btn next"><i class="fa-angle-right"></i></a> </div>'; $out .= '</div>'; return $out; } add_shortcode( 'testimonial-carousel', 'easyweb_webnus_testimonial_carousel' );
[+]
..
[-] ourclients.php
[edit]
[-] pricing-plan.php
[edit]
[-] callout.php
[edit]
[-] icon.php
[edit]
[-] blog.php
[edit]
[-] buy-process.php
[edit]
[-] tab.php
[edit]
[-] distance.php
[edit]
[-] heading.php
[edit]
[-] alerts.php
[edit]
[-] categorybox.php
[edit]
[-] columns.php
[edit]
[-] ministry.php
[edit]
[-] postfromblog.php
[edit]
[-] single-resource-books.php
[edit]
[-] ourteam.php
[edit]
[-] video-bg.php
[edit]
[-] accordion.php
[edit]
[-] title.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] webtags.php
[edit]
[-] slide-up-note.php
[edit]
[-] latest-from-blog.php
[edit]
[-] iconbox.php
[edit]
[-] quote.php
[edit]
[-] iconfonts-param.php
[edit]
[-] subscribe.php
[edit]
[-] list.php
[edit]
[-] buttons.php
[edit]
[-] checklist-param.php
[edit]
[-] maxslider.php
[edit]
[-] teaser-box.php
[edit]
[-] latest-news.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] our-porcess.php
[edit]
[-] lefttab.php
[edit]
[-] flexslider.php
[edit]
[-] icon-divider.php
[edit]
[-] googlemap.php
[edit]
[-] webnus-divider.php
[edit]
[-] tooltip.php
[edit]
[-] highlight.php
[edit]
[-] taglineslider.php
[edit]
[-] pie.php
[edit]
[-] countdown.php
[edit]
[-] maxcounter.php
[edit]
[-] testimonials.php
[edit]
[-] parallax.php
[edit]
[-] doublepromo.php
[edit]
[-] resource-books.php
[edit]
[-] progressbar.php
[edit]
[-] dropcap.php
[edit]
[-] video-play.php
[edit]
[-] blox.php
[edit]
[-] pricingtables.php
[edit]
[-] magicmore.php
[edit]