<?php
/**
 * Content - Testimonials Template
 *
 * This template can be overridden by copying it to mytheme/addons-for-elementor/addons/testimonials/content.php
 *
 */

use Elementor\Utils;

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

list($animate_class, $animation_attr) = tfl_get_animation_atts($testimonial['widget_animation']); ?>

<div class="tfl-grid-item tfl-testimonial <?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>

    <div class="tfl-testimonial-text">

        <?php echo $widget_instance->parse_text_editor($testimonial['testimonial_text']); ?>

    </div>

    <div class="tfl-testimonial-user">

        <div class="tfl-image-wrapper">

            <?php $client_image = $testimonial['client_image']; ?>

            <?php if (!empty($client_image)): ?>

                <?php echo wp_get_attachment_image($client_image['id'], 'thumbnail', false, array('class' => 'tfl-image full')); ?>

            <?php endif; ?>

        </div>

        <div class="tfl-text">

            <<?php echo Utils::validate_html_tag($settings['title_tag']); ?> class="tfl-author-name"><?php echo esc_html($testimonial['client_name']); ?></<?php echo Utils::validate_html_tag($settings['title_tag']); ?>>

        <div class="tfl-author-credentials"><?php echo wp_kses_post($testimonial['credentials']); ?></div>

    </div><!-- .tfl-text -->

</div><!-- .tfl-testimonial-user -->

</div><!-- .tfl-testimonial -->