PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
webnus-core
/
shortcodes
<?php function deep_testimonial ($atts, $content = null) { extract(shortcode_atts(array( 'type' =>'1', 'testimonial_content' =>'', 'testimonial_background' =>'', 'testimonial_content_color' =>'', 'img' =>'', 'name' =>'', 'social' => '', 'first_social' => 'twitter', 'first_url' => '', 'second_social' => 'facebook', 'second_url' => '', 'third_social' => 'google-plus', 'third_url' => '', 'fourth_social' => 'linkedin', 'fourth_url' => '', 'member_job' => '', 'thumbnail' => '', 'link_target' => '', 'shortcodeclass' => '', 'shortcodeid' => '', ), $atts)); wp_enqueue_style( 'wn-deep-testimonial', DEEP_ASSETS_URL . 'css/frontend/testimonial/testimonial.css' ); $shortcodeclass = $shortcodeclass ? $shortcodeclass : ''; $shortcodeid = $shortcodeid ? ' id="' . $shortcodeid . '"' : ''; $link_target_tag = ''; if ( $link_target == 'true' ){ $link_target_tag = ' target="_blank" '; } if(is_numeric($img)){ $img = wp_get_attachment_url( $img ); } $style = ''; static $uniqid = 0; $uniqid++; $comma_job = ( $type == '5' && $member_job ) ? ', ' . $member_job : '' ; $color = ( $testimonial_content_color ) ? ' #wrap .testimonial'. $uniqid .' { color:' . $testimonial_content_color . ';} ' : ''; $background = ( $testimonial_background ) ? ' #wrap .testimonial'. $uniqid .' .content { background:' . $testimonial_background . ';} ' : ''; $border_color = ( $testimonial_background ) ? ' #wrap .testimonial'. $uniqid .' .triangle { border-top-color:' . $testimonial_background . ';} ' : ''; $style .= $color . $background . $border_color; $live_page_builders_css = ''; // socials $socials = ''; if ( $social == 'enable' ) : $social1 = $social2 = $social3 = $social4 = ''; $social1 = ( $first_url ) ? '<a href="' . esc_url( $first_url ) . '" '.$link_target_tag.'><i class="wn-fab wn-fa-' . $first_social . '"></i></a>' : ''; $social2 = ( $second_url ) ? '<a href="' . esc_url( $second_url ) . '" '.$link_target_tag.'><i class="wn-fab wn-fa-' . $second_social . '"></i></a>' : ''; $social3 = ( $third_url ) ? '<a href="' . esc_url( $third_url ) . '" '.$link_target_tag.'><i class="wn-fab wn-fa-' . $third_social . '"></i></a>' : ''; $social4 = ( $fourth_url ) ? '<a href="' . esc_url( $fourth_url ) . '" '.$link_target_tag.'><i class="wn-fab wn-fa-' . $fourth_social . '"></i></a>' : ''; $socials = '<div class="tl-social-team">' . $social1 . $social2 . $social3 . $social4 . '</div>'; endif; $out = ''; $img = $img ? '<img src="'. $img .'" alt="'. $name .'">' : ''; if ( $type == 1 ) : $out .= '<div class="testimonial testimonial'. $uniqid .' ' . $shortcodeclass . '" ' . $shortcodeid . ' >'; $out .= '<div class="testimonial-content content">'; $out .= '<h4><q>'. $testimonial_content .'</q></h4>'; $out .= '<div class="testimonial-arrow"></div>'; $out .= '</div>'; $out .= '<div class="testimonial-brand">'.$img; $out .= '<h5><strong>'.$name.'</strong><br><em>'.$member_job.'</em></h5></div>'; $out .= '</div>'; elseif( $type == 4 ) : $out .=' <div class="testimonial'. esc_attr( $type ) .' testimonial'. $uniqid .' ' . $shortcodeclass . '" ' . $shortcodeid . ' > <div class="testimonial-content content "> <div class="testimonial-image"> ' . $img . ' </div> <h5> ' . $name . ' </h5> <q> ' . $testimonial_content . ' </q> </div> </div> '; elseif( $type == 5 ) : $out .=' <div class="testimonial'. esc_attr( $type ) .' testimonial'. $uniqid .' ' . $shortcodeclass . '" ' . $shortcodeid . ' > <div class="testimonial-content"> <div class="testimonial-image"> ' . $img . ' </div> <q class="content"> ' . $testimonial_content . ' </q> <span class="triangle"></span> <div class="name"> ' . $name . ' </div> <div class="job"> ' . $comma_job . ' </div> </div> </div> '; else : $name = $name ? '<h5><strong>'. $name .'</strong></h5>' : ''; $member_job = $member_job ? '<h6>'. $member_job .'</h6>' : ''; $content = $testimonial_content ? '<p class="content">'. $testimonial_content .'<span class="shape"></span></p>' : ''; if ( $type == 3 ) { $out = '<div class="testimonial'. esc_attr( $type ) .' testimonial'. $uniqid .' ' . $shortcodeclass . '" ' . $shortcodeid . ' > '. $img .'<div class="testimonial-content">'. $content . $socials .' <div class="t-m-footer">'.$name.' '.$member_job .'</div></div></div>'; } else { $out = ' <div class="testimonial'. esc_attr( $type ) .' testimonial'. $uniqid .'"> ' . $img . ' <div class="testimonial-content">' . $name . $content . '</div> </div>'; } endif; deep_save_dyn_styles( $style ); // live editor $live_page_builders_css .= $style; if ( ! in_array( 'admin-bar', get_body_class() ) ) { if ( ! empty( $live_page_builders_css ) ) { $out .= '<style>'; $out .= $live_page_builders_css; $out .= '</style>'; } } return $out; } add_shortcode( 'testimonial','deep_testimonial' );
[+]
..
[-] video-teaser.php
[edit]
[-] vcw.php
[edit]
[-] sermon-category.php
[edit]
[-] iconbox.php
[edit]
[-] speakers.php
[edit]
[-] iconfonts-param.php
[edit]
[-] checklist-param.php
[edit]
[-] infobox.php
[edit]
[-] webtags.php
[edit]
[-] teaser-box.php
[edit]
[-] latest-from-blog.php
[edit]
[-] reservation.php
[edit]
[-] subscribe.php
[edit]
[-] progressbar.php
[edit]
[-] review-items.php
[edit]
[-] icon-divider.php
[edit]
[-] toggle-box.php
[edit]
[+]
assets
[-] pie.php
[edit]
[-] asermon.php
[edit]
[-] buttons.php
[edit]
[-] accordion.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] deep-gallery.php
[edit]
[-] custom-menu.php
[edit]
[-] postslider.php
[edit]
[-] magazine.php
[edit]
[-] callout.php
[edit]
[-] maxcounter.php
[edit]
[-] testimonialslider.php
[edit]
[-] testimonials.php
[edit]
[-] wp-hotel-booking.php
[edit]
[-] services.php
[edit]
[-] image-carousel.php
[edit]
[-] category-tab.php
[edit]
[-] slide-up-note.php
[edit]
[-] ourteam.php
[edit]
[-] prayerwall-items.php
[edit]
[-] heading.php
[edit]
[-] tablepress.php
[edit]
[-] instagram.php
[edit]
[-] video-play.php
[edit]
[-] columns.php
[edit]
[-] special-offer.php
[edit]
[-] like-view-share.php
[edit]
[-] image-hotspot.php
[edit]
[-] postfromblog.php
[edit]
[-] roadmap.php
[edit]
[-] search.php
[edit]
[-] recipes.php
[edit]
[-] ourclients.php
[edit]
[-] tab.php
[edit]
[-] blog.php
[edit]
[-] icon.php
[edit]
[-] latest-tweets.php
[edit]
[-] before-after-image.php
[edit]
[-] food-menu.php
[edit]
[-] alerts.php
[edit]
[-] login.php
[edit]
[-] pricing-plan.php
[edit]
[-] dropcap.php
[edit]
[-] rooms.php
[edit]
[-] prayerwall-form.php
[edit]
[-] countdown.php
[edit]
[-] lefttab.php
[edit]
[-] schedule.php
[edit]
[-] block-quote.php
[edit]
[-] highlight.php
[edit]
[-] our-process.php
[edit]
[-] w-title.php
[edit]
[-] shop-products.php
[edit]
[-] buy-process.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] causes.php
[edit]
[-] review-form.php
[edit]
[-] pricingtables.php
[edit]
[-] sermons.php
[edit]
[-] distance.php
[edit]
[-] collection.php
[edit]
[-] donate.php
[edit]
[-] googlemap.php
[edit]
[-] list.php
[edit]
[-] acause.php
[edit]
[-] service-carousel.php
[edit]
[-] quote.php
[edit]
[-] w-svg.php
[edit]
[-] tooltip.php
[edit]
[-] socials.php
[edit]
[-] process-carousel.php
[edit]