PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Testimonials Widget */ namespace Elementor; class Tryo_Testimonials extends Widget_Base { public function get_name() { return 'Testimonials'; } public function get_title() { return __( 'Testimonials', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-blockquote'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Testimonials', [ 'label' => __( 'Testimonials', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'tryo_testimonials_items', [ 'label' => esc_html__('Testimonials Slider', 'tryo-toolkit'), 'type' => Controls_Manager::REPEATER, 'separator' => 'before', 'default' => [ [ 'name' => esc_html__(' item #1', 'tryo-toolkit') ], ], 'fields' => [ [ 'name' => 'image', 'label' => __( 'Image', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, ], [ 'name' => 'name', 'label' => esc_html__('Name', 'tryo-toolkit'), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('John Lucy', 'tryo-toolkit'), 'label_block' => true, ], [ 'name' => 'designation', 'label' => esc_html__('Designation', 'tryo-toolkit'), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Web Developer', 'tryo-toolkit'), 'label_block' => true, ], [ 'name' => 'feedback', 'label' => esc_html__('Feedback Description', 'tryo-toolkit'), 'type' => Controls_Manager::TEXTAREA, 'default' => esc_html__('Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'tryo-toolkit'), 'label_block' => true, ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'testimonials_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'name_font_size', [ 'label' => __( 'Name Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 70, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .feedback-slides .client-feedback .single-feedback h3' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'name_color', [ 'label' => __( 'Name Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .feedback-slides .client-feedback .single-feedback h3' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'designation_font_size', [ 'label' => __( 'Designation Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 70, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .feedback-slides .client-feedback .single-feedback span' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'designation_color', [ 'label' => __( 'Designation Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .feedback-slides .client-feedback .single-feedback span' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'feedback_font_size', [ 'label' => __( 'Feedback Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 70, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .feedback-slides .client-feedback .single-feedback p' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'feedback_color', [ 'label' => __( 'Feedback Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .feedback-slides .client-feedback .single-feedback p' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $slider = $settings['tryo_testimonials_items']; $count = 0; foreach ( $slider as $value ) { $count++; } global $tryo_opt; if( isset( $tryo_opt['enable_lazyloader'] ) ): $is_lazyloader = $tryo_opt['enable_lazyloader']; else: $is_lazyloader = true; endif; if( $is_lazyloader == true ): $lazy_class = 'smartify'; $lazy_attr = 'sm-'; else: $lazy_class = ''; $lazy_attr = ''; endif; ?> <div class="feedback-slides"> <div class="client-feedback"> <div> <?php foreach( $slider as $item ): ?> <div class="item"> <div class="single-feedback"> <i class="fas fa-quote-left quote-icon"></i> <p><?php echo esc_html( $item['feedback'] ); ?></p> <?php if( $item['image']['url'] != '' ): ?> <div class="client-img"> <img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $item['image']['url'] ); ?>" alt="<?php echo esc_attr($item['name']); ?>"> <div class="client-title"> <h3><?php echo esc_html( $item['name'] ); ?></h3> <span><?php echo esc_html( $item['designation'] ); ?></span> </div> </div> <?php endif; ?> </div> </div> <?php endforeach; ?> </div> </div> <?php if( $count > 1 ) { ?> <div class="client-thumbnails"> <?php if( $count > 1 ) { ?> <div> <?php foreach( $slider as $item ): ?> <div class="item"> <?php if( $item['image']['url'] != '' ): ?> <div class="img-fill"><img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $item['image']['url'] ); ?>" alt="<?php echo esc_attr( $item['name'] ); ?>"></div> <?php endif; ?> </div> <?php endforeach; ?> </div> <?php } ?> <button class="prev-arrow slick-arrow"> <i class="fa fa-arrow-left"></i> </button> <button class="next-arrow slick-arrow"> <i class="fa fa-arrow-right"></i> </button> </div> <?php } ?> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Testimonials );
[-] banner-feature.php
[edit]
[-] profile-form.php
[edit]
[-] business-area.php
[edit]
[-] services-two.php
[edit]
[-] banner-two.php
[edit]
[-] signup.php
[edit]
[+]
..
[-] payment-experience-area.php
[edit]
[-] post.php
[edit]
[-] works.php
[edit]
[-] account-create.php
[edit]
[-] comparisons-table.php
[edit]
[-] partner-slider.php
[edit]
[-] app-download.php
[edit]
[-] feature-box.php
[edit]
[-] team.php
[edit]
[-] global-area.php
[edit]
[-] userinfo-details.php
[edit]
[-] banner-three.php
[edit]
[-] pricing.php
[edit]
[-] success-story-area.php
[edit]
[-] contact-card.php
[edit]
[-] contact-cta-box.php
[edit]
[-] services-area.php
[edit]
[-] ready-to-talk.php
[edit]
[-] section.php
[edit]
[-] receive-details.php
[edit]
[-] about-area.php
[edit]
[-] banner-four.php
[edit]
[-] send-details.php
[edit]
[-] support-area.php
[edit]
[-] invoicing.php
[edit]
[-] testimonials.php
[edit]
[-] funfact.php
[edit]
[-] signin.php
[edit]
[-] information-box.php
[edit]
[-] new-payment.php
[edit]
[-] banner-one.php
[edit]
[-] feedback-card.php
[edit]
[-] feature.php
[edit]