PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Partner Widget */ namespace Elementor; class Tryo_Partner extends Widget_Base { public function get_name() { return 'Tryo_Partner'; } public function get_title() { return __( 'Partner', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-logo'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Partner', [ 'label' => __( 'Partner Control', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'partner_item', [ 'label' => esc_html__('Partner Item', 'tryo-toolkit'), 'type' => Controls_Manager::REPEATER, 'separator' => 'before', 'fields' => [ [ 'name' => 'logo', 'label' => __( 'Partner Logo', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, ], [ 'name' => 'logo_hover', 'label' => __( 'Hover Partner Logo', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, ], [ 'name' => 'link', 'label' => __( 'Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, 'show_external' => true, 'default' => [ 'url' => '#', ], ], ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); 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="partner-area"> <div class="container"> <div class="partner-inner"> <div class="row align-items-center"> <?php foreach( $settings['partner_item'] as $item ): ?> <div class="single-partner-item"> <?php if( $item['logo']['url'] != '' ): ?> <a href="<?php echo esc_url( $item['link']['url'] ); ?>"> <img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $item['logo']['url'] ); ?>" alt="<?php echo esc_attr__( 'Partner', 'tryo' ); ?>"> <img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $item['logo_hover']['url'] ); ?>" alt="<?php echo esc_attr__( 'Partner', 'tryo' ); ?>"> </a> <?php endif; ?> </div> <?php endforeach; ?> </div> </div> </div> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Partner );
[-] 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]