HEX
Server: Apache
System: Linux p3plzcpnl507484.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: tvypkwena2lu (5224663)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /home/tvypkwena2lu/public_html/wp-content/plugins/widgets/theme-home-testimonial.php
<?php
/**
 * Elementor oEmbed Widget.
 *
 * Elementor widget that inserts an embbedable content into the page, from any given URL.
 *
 * @since 1.0.0
 */
class Elementor_HomeTestimonial_Widget extends \Elementor\Widget_Base {

	public function get_name() {
		return 'theme_home_testimonial';
	}

	public function get_title() {
		return __( 'Theme Home Testimonial', 'plugin-name' );
	}

	public function get_icon() {
		return 'fa fa-code';
	}

	public function get_categories() {
		return [ 'theme-specific-category' ];
	}

	protected function _register_controls() {

		$this->start_controls_section(
			'content_section',
			[
				'label' => __( 'Content', 'plugin-name' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);
		$repeater = new \Elementor\Repeater();
		$repeater->add_control(
			'list_title', [
				'label' => __( 'Name', 'plugin-domain' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'default' => __( 'Author Name' , 'plugin-domain' ),
				'label_block' => true,
			]
		);
		$repeater->add_control(
			'list_designation', [
				'label' => __( 'Designation', 'plugin-domain' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'default' => __( 'Author Designation' , 'plugin-domain' ),
				'label_block' => true,
			]
		);			
		$repeater->add_control(
			'list_desc', [
				'label' => __( 'Short Description', 'plugin-domain' ),
				'type' => \Elementor\Controls_Manager::TEXTAREA,
				'rows' => 3,
				'default' => __( 'List Short Description' , 'plugin-domain' ),
				'label_block' => true,
				'separator' => 'after',
			]
		);	
		
		$this->add_control(
			'list',
			[
				'label' => __( 'Slider Items', 'plugin-domain' ),
				'type' => \Elementor\Controls_Manager::REPEATER,
				'fields' => $repeater->get_controls(),
				'default' => [
					[
						'list_title' => __( 'Malina Saval', 'plugin-domain' ),
						'list_designation' => __( 'Author of The Secret Lives of Boys and Jewish Summer Camp Mafia', 'plugin-domain' ),
						'list_desc' => __( 'Barr’s book reads like a sweeping epic film, a nail-biting, on-the-edge-of- your-seat thriller, a cinematic tour-de-force in brilliant literary form . . .', 'plugin-domain' ),
					],
					[
						'list_title' => __( 'B. A. Shapiro', 'plugin-domain' ),
						'list_designation' => __( 'New York Times bestselling author of The Art Forger', 'plugin-domain' ),
						'list_desc' => __( 'Insightful. Fascinating. Un-put-downable.', 'plugin-domain' ),
					],
					[
						'list_title' => __( 'Booklist', 'plugin-domain' ),
						'list_designation' => __( 'Booklist', 'plugin-domain' ),
						'list_desc' => __( 'Masterfully conceived and crafted, Barr’s dazzling debut novel has it all: passion and jealousy, intrigue and danger.', 'plugin-domain' ),
					],
					[
						'list_title' => __( 'Pam Jenoff', 'plugin-domain' ),
						'list_designation' => __( 'Author of The Kommandant’s Girl', 'plugin-domain' ),
						'list_desc' => __( 'Lisa Barr paints with vivid prose the grim setting and dire choices of the era to create a haunting tapestry of human heroism and sacrifice that is truly unforgettable.', 'plugin-domain' ),
					],
					[
						'list_title' => __( 'Judith Basya', 'plugin-domain' ),
						'list_designation' => __( 'literary editor, HEEB Magazine, which listed Fugitive Colors among its Top 10 Books of 2014', 'plugin-domain' ),
						'list_desc' => __( 'As a historical novel, Fugitive Colors offers a fascinating account of the Nazis attempt to ‘purify’ art (when they weren’t busy purifying the population).As an epic thriller, former Jerusalem Post editor Barr’s fiction debut ', 'plugin-domain' ),
					],					
				],
				'title_field' => '{{{ list_title }}}',
			]
		);		
		

		$this->end_controls_section();

	}

	protected function render() {

		$settings = $this->get_settings_for_display();
		//$settings['testimonial_style']
		if(!empty($settings['list'])) {
			$slider_item='';
			foreach($settings['list'] as $slider){
					$all_book_review.='
					<div class="swiper-slide">
						<div class="testimonial-content-blk text-center">
							<div class="testimonial-content">
								<p>'.$slider['list_desc'].'</p>
							</div>
							<div class="testimonial-title">
								<h4>'.$slider['list_title'].'</h4>
								<p>'.$slider['list_designation'].'</p>
							</div>
						</div>
					</div>
					';				
			}
			
			echo '
			<div class="row">
				<div class="col-12 col-lg-8 offset-lg-2">
					<div class="testimonial-blk">
						<div class="testimonial-slider swiper-container">
							<div class="swiper-wrapper">
							'.$all_book_review.'
							</div>
							<div class="swiper-button-next1"></div>
							<div class="swiper-button-prev1"></div>
						</div>
					</div>
				</div>
			</div>			
			';			
		}
	}
}