PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.3
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.3
3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 All 261 releases
wpfunnels / public / modules / checkout / testimonial / layout-1.php

layout-1.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.3, at public/modules/checkout/testimonial/layout-1.php

79 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Testimonial section – Layout 1 (stacked)
4 *
5 * Part A: quote block (open-quote icon, stars, text, author)
6 * Part B: benefits block (title + checkmark list)
7 *
8 * @package WPFunnels
9 * @var array $args Full testimonial config array passed via load_template().
10 */
11
12 defined( 'ABSPATH' ) || exit;
13
14 $testimonial = isset( $args['testimonial'] ) && is_array( $args['testimonial'] ) ? $args['testimonial'] : array();
15 $benefits = isset( $args['benefits'] ) && is_array( $args['benefits'] ) ? $args['benefits'] : array();
16
17 $text = isset( $testimonial['text'] ) ? $testimonial['text'] : '';
18 $author = isset( $testimonial['author'] ) ? $testimonial['author'] : '';
19 $rating = isset( $testimonial['rating'] ) ? (int) $testimonial['rating'] : 5;
20 $rating = max( 1, min( 5, $rating ) );
21
22 $ben_title = isset( $benefits['title'] ) ? $benefits['title'] : '';
23 $ben_items = isset( $benefits['items'] ) && is_array( $benefits['items'] ) ? $benefits['items'] : array();
24 $ben_items = array_filter( $ben_items, static function ( $item ) {
25 return '' !== trim( $item );
26 } );
27 ?>
28
29 <div class="wpfnl-testimonial-section">
30 <!-- Part A: Testimonial quote block -->
31 <div class="wpfnl-checkout-testimonial1">
32 <div class="wpfnl-testimonial-quote-icon" aria-hidden="true">
33 <svg xmlns="http://www.w3.org/2000/svg" width="39" height="26" viewBox="0 0 39 26" fill="none"><path d="M31.7776 8.90091C32.5698 6.88793 33.8183 4.89914 35.4869 2.98311C36.0151 2.37678 36.0871 1.50369 35.655 0.824603C35.3188 0.291032 34.7667 4.94675e-06 34.1664 4.89427e-06C33.9984 4.87958e-06 33.8303 0.0120708 33.6622 0.0727645C30.133 1.11564 21.8859 4.81424 21.6578 16.6741C21.5738 21.2458 24.887 25.1748 29.1966 25.6235C31.5855 25.866 33.9623 25.0779 35.727 23.4771C37.4916 21.8643 38.5 19.5602 38.5 17.1591C38.5 13.1574 35.6909 9.65275 31.7776 8.90091Z" fill="#fe7e6d"/><path d="M7.55144 25.6235C9.92857 25.866 12.3056 25.0779 14.0704 23.4771C15.8353 21.8643 16.8438 19.5602 16.8438 17.1591C16.8438 13.1574 14.0344 9.65276 10.1206 8.9009C10.913 6.88792 12.1616 4.89913 13.8304 2.98311C14.3586 2.37678 14.4306 1.5037 13.9984 0.824603C13.6623 0.291032 13.11 4.94671e-06 12.5097 4.89423e-06C12.3417 4.87954e-06 12.1736 0.0120708 12.0055 0.0727645C8.47588 1.11564 0.228107 4.81424 7.86154e-07 16.6741L7.71317e-07 16.8438C3.78001e-07 21.3428 3.27748 25.1748 7.55144 25.6235Z" fill="#fe7e6d"/></svg>
34 </div>
35
36 <div class="wpfnl-testimonial-stars" aria-label="<?php echo esc_attr( sprintf( __( 'Rating: %d out of 5 stars', 'wpfnl' ), $rating ) ); ?>">
37 <?php for ( $i = 1; $i <= 5; $i++ ) : ?>
38 <span class="wpfnl-testimonial-star<?php echo $i <= $rating ? ' wpfnl-testimonial-star-filled' : ' wpfnl-testimonial-star-empty'; ?>" aria-hidden="true">&#9733;</span>
39 <?php endfor; ?>
40 </div>
41
42 <?php if ( $text ) : ?>
43 <p class="wpfnl-testimonial-text"><?php echo esc_html( $text ); ?></p>
44 <?php endif; ?>
45
46 <?php if ( $author ) : ?>
47 <p class="wpfnl-testimonial-author"><?php echo esc_html( $author ); ?></p>
48 <?php endif; ?>
49
50 </div>
51 <!-- /.wpfnl-checkout-testimonial1 -->
52 </div><!-- /.wpfnl-testimonial-section.wpfnl-testimonial-layout-1 -->
53
54
55 <?php if ( $ben_title || $ben_items ) : ?>
56 <!-- Part B: Benefits block -->
57 <div class="wpfnl-testimonial-benefits">
58
59 <?php if ( $ben_title ) : ?>
60 <h3 class="wpfnl-testimonial-benefits-title"><?php echo esc_html( $ben_title ); ?></h3>
61 <?php endif; ?>
62
63 <?php if ( $ben_items ) : ?>
64 <ul class="wpfnl-testimonial-benefits-list">
65 <?php foreach ( $ben_items as $item ) : ?>
66 <li class="wpfnl-testimonial-benefits-item">
67 <span class="wpfnl-testimonial-check-icon" aria-hidden="true">
68 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M7.33301 12.0003L10.6663 15.3337L17.333 8.66699" stroke="#039855" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><rect width="24" height="24" rx="12" fill="#039855" fill-opacity=".16"/></svg>
69 </span>
70 <span class="wpfnl-testimonial-benefits-item-text"><?php echo esc_html( $item ); ?></span>
71 </li>
72 <?php endforeach; ?>
73 </ul>
74 <?php endif; ?>
75
76 </div>
77 <!-- /.wpfnl-testimonial-benefits -->
78 <?php endif; ?>
79