| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template: Testimonial |
| 4 |
* |
| 5 |
* @package RadiusTheme\SB |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Template variables: |
| 10 |
* |
| 11 |
* @var $testimonial array |
| 12 |
* @var $instance object |
| 13 |
* @var $has_designation boolean |
| 14 |
* @var $display_author_image boolean |
| 15 |
* @var $display_quote_icon boolean |
| 16 |
* @var $has_rating boolean |
| 17 |
* @var $display_author_rating boolean |
| 18 |
* @var $author_designation string |
| 19 |
* @var $author_name string |
| 20 |
* @var $author_description string |
| 21 |
* @var $author_name_html_tag string |
| 22 |
* @var $author_rating string |
| 23 |
* @var $grid_classes string |
| 24 |
* array |
| 25 |
*/ |
| 26 |
|
| 27 |
// Do not allow directly accessing this file. |
| 28 |
|
| 29 |
use RadiusTheme\SB\Helpers\Fns; |
| 30 |
|
| 31 |
if ( ! defined( 'ABSPATH' ) ) { |
| 32 |
exit( 'This script cannot be accessed directly.' ); |
| 33 |
} |
| 34 |
$quote_icon = '<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em" fill="currentColor"><path d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"></path></svg>'; |
| 35 |
?> |
| 36 |
<div class="<?php echo esc_attr( $grid_classes ); ?>"> |
| 37 |
<div class="rtsb-testimonial-item"> |
| 38 |
<div class="rtsb-testimonial-author"> |
| 39 |
<?php if ( $display_author_image ) { ?> |
| 40 |
<div class="rtsb-testimonial-author-img"> |
| 41 |
<?php Fns::print_html( $instance->render_author_image( $testimonial ) ); ?> |
| 42 |
</div> |
| 43 |
<?php } ?> |
| 44 |
<?php if ( $author_name ) { ?> |
| 45 |
<<?php Fns::print_validated_html_tag( $author_name_html_tag ); ?> class="rtsb-testimonial-author-name rtsb-tag"> |
| 46 |
<?php Fns::print_html( $author_name ); ?> |
| 47 |
</<?php Fns::print_validated_html_tag( $author_name_html_tag ); ?>> |
| 48 |
<?php } ?> |
| 49 |
<?php if ( $has_designation ) { ?> |
| 50 |
<span class="rtsb-testimonial-author-designation"><?php Fns::print_html( $author_designation ); ?></span> |
| 51 |
<?php } ?> |
| 52 |
</div> |
| 53 |
<div class="rtsb-testimonial-content"> |
| 54 |
<?php if ( $has_rating ) { ?> |
| 55 |
<div class="rtsb-rating"> |
| 56 |
<div class="rtsb-rating-inner"> |
| 57 |
<div class="rtsb-star-rating"> |
| 58 |
<span style="--rtsb-testimonial-rating:<?php echo esc_attr( $author_rating * 20 ); ?>%"></span> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
<?php } ?> |
| 63 |
<div class="rtsb-testimonial-description"> |
| 64 |
<?php |
| 65 |
if ( $display_quote_icon ) { |
| 66 |
?> |
| 67 |
<span class="rtsb-quote-icon"> |
| 68 |
<?php Fns::print_html( $quote_icon ); ?> |
| 69 |
</span> |
| 70 |
<?php |
| 71 |
} |
| 72 |
?> |
| 73 |
<?php if ( $author_description ) { ?> |
| 74 |
<?php Fns::print_html( $author_description ); ?> |
| 75 |
<?php } ?> |
| 76 |
</div> |
| 77 |
</div> |
| 78 |
</div> |
| 79 |
</div> |
| 80 |
|
| 81 |
|