PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Success Story Area Widget */ namespace Elementor; class Tryo_Success_Story extends Widget_Base { public function get_name() { return 'Success_Story'; } public function get_title() { return __( 'Success Story Area', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-inner-section'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Success_Story', [ 'label' => __( 'Success Story Control', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Business success story', 'tryo-toolkit'), ] ); $this->add_control( 'title_tag', [ 'label' => esc_html__( 'Title Tag', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1' => esc_html__( 'h1', 'tryo-toolkit' ), 'h2' => esc_html__( 'h2', 'tryo-toolkit' ), 'h3' => esc_html__( 'h3', 'tryo-toolkit' ), 'h4' => esc_html__( 'h4', 'tryo-toolkit' ), 'h5' => esc_html__( 'h5', 'tryo-toolkit' ), 'h6' => esc_html__( 'h6', 'tryo-toolkit' ), ], 'default' => 'h1', ] ); $this->add_control( 'items', [ 'type' => Controls_Manager::REPEATER, 'label' => esc_html__( 'Add Slider Item', 'tryo-toolkit' ), 'fields' => array( array( 'label' => __( 'Image', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, 'name' => 'image', ), array( 'label' => __( 'Description', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXTAREA, 'name' => 'description', 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse.', ), array( 'label' => __( 'Name', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'name' => 'name', 'default' => 'John Smit', ), array( 'label' => __( 'Designation', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'name' => 'designation', 'default' => 'CTO at EnvyTheme', ), array( 'label' => __( 'Video Button Text', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'name' => 'button', 'default' => 'Watch Video', ), array( 'label' => __( 'YouTube Video Link', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'name' => 'video_link', 'default' => 'https://www.youtube.com/watch?v=bk7McNUjWgw', ), ), ] ); $this->end_controls_section(); $this->start_controls_section( 'funfacts_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'section_bg_color', [ 'label' => __( 'Section Background Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .success-story-inner' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'title_color', [ 'label' => __( 'Name Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-success-story-box .content 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-success-story-box .content h3', ] ); $this->add_control( 'desc_color', [ 'label' => __( 'Designation Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-success-story-box .content 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-success-story-box .content h3 span', ] ); $this->add_control( 'feedback_color', [ 'label' => __( 'Feedback Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-success-story-box .content 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-success-story-box .content p', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); ?> <div class="success-story-area ptb-70 pt-0"> <div class="container"> <div class="section-title"> <<?php echo esc_attr( $settings['title_tag'] ); ?> <?php echo $this-> get_render_attribute_string('title'); ?>> <?php echo esc_html( $settings['title'] ); ?> </<?php echo esc_attr( $settings['title_tag'] ); ?>> </div> <div class="success-story-inner"> <div class="success-story-slides owl-carousel owl-theme"> <?php foreach( $settings['items'] as $item ): ?> <div class="single-success-story-box"> <div class="row m-0 align-items-center"> <div class="col-lg-6 col-md-6 p-0"> <div class="content"> <p><?php echo esc_html( $item['description'] ); ?></p> <h3><?php echo esc_html( $item['name'] ); ?> <span><?php echo esc_html( $item['designation'] ); ?></span></h3> <?php if( $item['button'] != '' ): ?> <a href="<?php echo esc_url( $item['video_link'] ); ?>" class="btn btn-primary popup-youtube"><?php echo esc_html( $item['button'] ); ?></a> <?php endif; ?> </div> </div> <div class="col-lg-6 col-md-6 p-0"> <?php if( $item['image']['url'] != '' ): ?> <div class="image"> <img src="<?php echo esc_url( $item['image']['url'] ); ?>" alt="<?php esc_attr( $item['title'] ); ?>"> </div> <?php endif; ?> </div> </div> </div> <?php endforeach; ?> </div> </div> </div> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Success_Story );
[-] 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]