PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
themes
/
flatsome
/
inc
/
shortcodes
<?php // [testimonial] function flatsome_testimonial($atts, $content = null) { global $flatsome_opt; $sliderrandomid = rand(); extract(shortcode_atts(array( 'name' => '', 'class' => '', 'visibility' => '', 'company' => '', 'stars' => '5', 'font_size' => '', 'text_align' => '', 'image' => '', 'image_width' => '80', 'pos' => 'left', 'link' => '', ), $atts)); ob_start(); $classes = array('testimonial-box'); $classes_img = array('icon-box-img','testimonial-image','circle'); $classes[] = 'icon-box-'.$pos; if ( $class ) $classes[] = $class; if ( $visibility ) $classes[] = $visibility; if($pos == 'center') $classes[] = 'text-center'; if($pos == 'left' || $pos == 'top') $classes[] = 'text-left'; if($pos == 'right') $classes[] = 'text-right'; if($font_size) $classes[] = 'is-'.$font_size; if($image_width) $image_width = 'width: '.intval($image_width).'px'; $star_row = ''; if ($stars == '1'){$star_row = '<div class="star-rating"><span style="width:25%"><strong class="rating"></strong></span></div>';} else if ($stars == '2'){$star_row = '<div class="star-rating"><span style="width:35%"><strong class="rating"></strong></span></div>';} else if ($stars == '3'){$star_row = '<div class="star-rating"><span style="width:55%"><strong class="rating"></strong></span></div>';} else if ($stars == '4'){$star_row = '<div class="star-rating"><span style="width:75%"><strong class="rating"></strong></span></div>';} else if ($stars == '5'){$star_row = '<div class="star-rating"><span style="width:100%"><strong class="rating"></strong></span></div>';} $classes = implode(" ", $classes); $classes_img = implode(" ", $classes_img); ?> <div class="icon-box <?php echo esc_attr( $classes ); ?>"> <?php if($image) { ?> <div class="<?php echo esc_attr( $classes_img ); ?>" style="<?php if($image_width) echo $image_width; ?>"> <?php echo flatsome_get_image($image, $size = 'thumbnail', $alt = $name) ;?> </div> <?php } ?> <div class="icon-box-text p-last-0"> <?php if($stars > 0) echo $star_row; ?> <div class="testimonial-text line-height-small italic test_text first-reset last-reset is-italic"> <?php echo do_shortcode( $content ); ?> </div> <div class="testimonial-meta pt-half"> <strong class="testimonial-name test_name"><?php echo wp_kses_post( $name ); ?></strong> <?php if($name && $company) echo '<span class="testimonial-name-divider"> / </span>'; ?> <span class="testimonial-company test_company"><?php echo wp_kses_post( $company ); ?></span> </div> </div> </div> <?php $content = ob_get_contents(); ob_end_clean(); return $content; } add_shortcode("testimonial", "flatsome_testimonial");
[-] ux_video.php
[edit]
[-] ux_stack.php
[edit]
[-] gap.php
[edit]
[-] ux_payment_icons.php
[edit]
[-] row.php
[edit]
[-] page_header.php
[edit]
[-] ux_slider.php
[edit]
[-] buttons.php
[edit]
[-] scroll_to.php
[edit]
[-] product_flip.php
[edit]
[-] messages.php
[edit]
[-] ux_banner_grid.php
[edit]
[-] tabs.php
[edit]
[-] ux_translation.php
[edit]
[-] ux_banner.php
[edit]
[-] price_table.php
[edit]
[-] ux_products.php
[edit]
[-] ux_html.php
[edit]
[-] ux_pages.php
[edit]
[-] ux_menu_title.php
[edit]
[-] search.php
[edit]
[-] custom-product.php
[edit]
[-] ux_products_list.php
[edit]
[-] ux_lottie.php
[edit]
[-] accordion.php
[edit]
[+]
ux_countdown
[-] featured_box.php
[edit]
[-] titles_dividers.php
[edit]
[-] ux_instagram_feed.php
[edit]
[-] ux_image.php
[edit]
[-] ux_menu_link.php
[edit]
[-] ux_gallery.php
[edit]
[-] google_maps.php
[edit]
[-] ux_sidebar.php
[edit]
[-] portfolio.php
[edit]
[-] product_categories.php
[edit]
[-] follow.php
[edit]
[-] lightbox.php
[edit]
[-] team_members.php
[edit]
[-] testimonials.php
[edit]
[-] blog_posts.php
[edit]
[-] ux_image_box.php
[edit]
[-] ux_logo.php
[edit]
[-] ux_text.php
[edit]
[-] sections.php
[edit]
[-] share.php
[edit]
[-] ux_hotspot.php
[edit]
[+]
..
[-] ux_menu.php
[edit]
[-] ux_nav.php
[edit]
[+]
commons
[-] text_box.php
[edit]