PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Feedback Box Widget */ namespace Elementor; class Tryo_Feedback_Box extends Widget_Base { public function get_name() { return 'Feedback_Box'; } public function get_title() { return __( 'Feedback Box', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-editor-quote'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Feedback_Box', [ 'label' => __( 'Feedback Control', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'icons', [ 'type' => Controls_Manager::REPEATER, 'label' => esc_html__( 'Add rating icon', 'tryo-toolkit' ), 'fields' => array( array( 'label' => __( 'Icon', 'tryo-toolkit' ), 'name' => 'icon', 'type' => Controls_Manager::ICON, 'options' => tryo_icons(), ), ), ] ); $this->add_control( 'name', [ 'label' => esc_html__('Name', 'tryo-toolkit'), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('John Smith', 'tryo-toolkit'), 'label_block' => true, ] ); $this->add_control( 'designation', [ 'label' => esc_html__('Designation', 'tryo-toolkit'), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('CTO at EnvyTheme', 'tryo-toolkit'), 'label_block' => true, ] ); $this->add_control( 'feedback', [ 'label' => esc_html__('Feedback', 'tryo-toolkit'), 'type' => Controls_Manager::TEXTAREA, 'default' => esc_html__('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse.', 'tryo-toolkit'), 'label_block' => true, ] ); $this->end_controls_section(); $this->start_controls_section( 'funfacts_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'title_color', [ 'label' => __( 'Name Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-testimonials-box h3' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __( 'Name Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .single-testimonials-box h3', ] ); $this->add_control( 'desc_color', [ 'label' => __( 'Designation Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-testimonials-box h3 span' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'label' => __( 'Designation Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .single-testimonials-box h3 span', ] ); $this->add_control( 'feedback_color', [ 'label' => __( 'Feedback Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-testimonials-box p' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'feedback_typography', 'label' => __( 'Feedback Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .single-testimonials-box p', ] ); $this->add_control( 'border_color', [ 'label' => __( 'Border Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, '{{WRAPPER}} .single-testimonials-box' => 'border-color: {{VALUE}}', '{{WRAPPER}} .single-testimonials-box' => 'box-shadow: 5px 5px {{VALUE}}', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); // Inline Editing $this-> add_inline_editing_attributes('name','none'); $this-> add_inline_editing_attributes('designation','none'); $this-> add_inline_editing_attributes('feedback','none'); ?> <div class="single-testimonials-box"> <?php if( $settings['icons'] ): ?> <div class="rating"> <?php foreach( $settings['icons'] as $icon ): ?> <i class="<?php echo esc_attr( $icon['icon'] ); ?>"></i> <?php endforeach; ?> </div> <?php endif; ?> <p <?php echo $this-> get_render_attribute_string('title'); ?>><?php echo esc_html( $settings['feedback'] ); ?></p> <h3><?php echo esc_html( $settings['name'] ); ?> <span><?php echo esc_html( $settings['designation'] ); ?></span></h3> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Feedback_Box );
[-] 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]