PluginProbe ʕ •ᴥ•ʔ
Strong Testimonials / 3.3.6
Strong Testimonials v3.3.6
3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.0.1 2.30.9 2.31.10 2.32 2.32.1 2.32.2 2.32.3 2.32.4 2.33 2.34 2.35 2.36 2.37 2.38 2.38.1 2.39 2.39.1 2.39.2 2.39.3 2.40.0 2.40.1 2.40.2 2.40.3 2.40.4 2.40.5 2.40.6 2.40.7 2.41.0 2.41.1 2.50.0 2.50.1 2.50.2 2.50.3 2.50.4 2.51.0 2.51.1 2.51.2 2.51.3 2.51.4 2.51.5 2.51.6 2.51.7 2.51.8 2.51.9 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0
strong-testimonials / templates / default-theme / content.php
strong-testimonials / templates / default-theme Last commit date
config.json 3 weeks ago content.css 3 weeks ago content.php 3 weeks ago
content.php
91 lines
1 <?php
2 /**
3 * Template Name: Default
4 * Description: Inherits your theme's styles for a seamless look.
5 */
6
7 do_action( 'wpmtst_before_view' );
8
9 ?>
10
11 <div class="strong-view <?php wpmtst_container_class(); ?>"<?php wpmtst_container_data(); ?>>
12 <?php do_action( 'wpmtst_view_header' ); ?>
13
14 <div class="strong-content <?php wpmtst_content_class(); ?>">
15 <?php do_action( 'wpmtst_before_content', $atts ); ?>
16 <?php
17 // Drop the unprefixed "testimonial" class — this template only uses wpmtst-* classes.
18 $wpmtst_strip_unprefixed_post_class = function ( $classes ) {
19 return implode( ' ', array_diff( explode( ' ', $classes ), array( 'testimonial' ) ) );
20 };
21 add_filter( 'wpmtst_post_class', $wpmtst_strip_unprefixed_post_class );
22
23 while ( $query->have_posts() ) :
24 $query->the_post();
25 ?>
26 <?php
27 $wpmtst_avatar_html = wpmtst_get_thumbnail();
28 /*
29 * Read the configured height directly rather than parsing it back out of the
30 * rendered <img> tag — WordPress doesn't always emit width/height attributes
31 * that match the requested size (e.g. non-croppable images), which threw the
32 * overlap math off for some photos.
33 */
34 $wpmtst_avatar_height = 0;
35 if ( $wpmtst_avatar_html ) {
36 $wpmtst_avatar_height = 'custom' === WPMST()->atts( 'thumbnail_size' )
37 ? (int) WPMST()->atts( 'thumbnail_height' )
38 : 100;
39 }
40 ?>
41 <div class="<?php wpmtst_post_class( $atts ); ?> wp-block-post wp-block-group" style="--wpmtst-avatar-size: <?php echo esc_attr( $wpmtst_avatar_height ); ?>px;">
42 <div class="wpmtst-testimonial-inner">
43 <?php do_action( 'wpmtst_before_testimonial' ); ?>
44
45 <?php if ( $wpmtst_avatar_html ) : ?>
46 <figure class="wp-block-image wpmtst-testimonial-avatar"><?php echo $wpmtst_avatar_html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already filtered/escaped by wpmtst_get_thumbnail(). ?></figure>
47 <?php endif; ?>
48
49 <?php wpmtst_the_title( 'h2', 'wp-block-heading wpmtst-testimonial-heading' ); ?>
50
51 <?php
52 if ( isset( $atts['client_section'] ) && is_array( $atts['client_section'] ) ) {
53 foreach ( $atts['client_section'] as $field ) {
54 if ( 'author' === ( $field['type'] ?? '' ) ) {
55 $wpmtst_author_value = wpmtst_get_field( $field['field'] );
56 if ( $wpmtst_author_value ) {
57 printf(
58 '<h2 class="wp-block-heading wpmtst-testimonial-field %s">%s</h2>',
59 esc_attr( $field['class'] ?? '' ),
60 wp_kses_post( $wpmtst_author_value )
61 );
62 }
63 continue;
64 }
65 echo wpmtst_the_custom_field_as_paragraph( $field );
66 }
67 }
68 ?>
69
70 <div class="wpmtst-testimonial-content">
71 <?php wpmtst_the_content(); ?>
72 <?php do_action( 'wpmtst_after_testimonial_content' ); ?>
73 </div>
74
75 <?php do_action( 'wpmtst_after_testimonial', $atts ); ?>
76 </div>
77
78 </div>
79 <?php endwhile; ?>
80
81 <?php
82 remove_filter( 'wpmtst_post_class', $wpmtst_strip_unprefixed_post_class );
83 do_action( 'wpmtst_after_content', $atts );
84 ?>
85 </div>
86
87 <?php do_action( 'wpmtst_view_footer' ); ?>
88 </div>
89
90 <?php do_action( 'wpmtst_after_view' ); ?>
91