PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Team Widget */ namespace Elementor; class Tryo_Team extends Widget_Base { public function get_name() { return 'Tryo_Team'; } public function get_title() { return __( 'Team Section', 'tryo-toolkit' ); } public function get_icon() { return 'fa fa-users'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Team', [ 'label' => __( 'Tryo Team', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'image', [ 'label' => __( 'Choose Team Member Image', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'name', [ 'label' => __( 'Name', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Sarah Taylor', 'tryo-toolkit'), ] ); $this->add_control( 'designation', [ 'label' => __( 'Designation', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Co-Founder', 'tryo-toolkit'), ] ); $this->add_control( 'social_link', [ 'label' => esc_html__('Add Social Link', 'tryo-toolkit'), 'type' => Controls_Manager::REPEATER, 'separator' => 'before', 'fields' => [ [ 'name' => 'icon', 'label' => __( 'Social Icon', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-facebook', ], [ 'name' => 'link', 'label' => __( 'Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, 'show_external' => true, 'default' => [ 'url' => '#', ], ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'career_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'name_color', [ 'label' => __( 'Name Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-team-member .member-content h3' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'name_size', [ 'label' => __( 'Name Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 40, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .single-team-member .member-content h3' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'designation_color', [ 'label' => __( 'Designation Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-team-member .member-content span' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'designation_size', [ 'label' => __( 'Designation Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 20, 'max' => 70, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .single-team-member .member-content span' => 'font-size: {{SIZE}}px;', ], ] ); $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; $social_array = $settings['social_link']; // Inline Editing $this-> add_inline_editing_attributes('name','none'); $this-> add_inline_editing_attributes('designation','none'); ?> <div class="single-team-member"> <div class="member-image"> <img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $settings['image']['url'] ); ?>" alt="<?php echo esc_attr( $settings['name'] ); ?>"> <ul class="social"> <?php foreach( $social_array as $social_link ) {?> <li><a href="<?php echo esc_url( $social_link['link']['url'] ); ?>" target="_blank"><i class="<?php echo esc_attr( $social_link['icon'] ); ?>"></i></a></li> <?php } ?> </ul> </div> <div class="member-content"> <h3 <?php echo $this-> get_render_attribute_string('name'); ?>><?php echo esc_html( $settings['name'] ); ?></h3> <span <?php echo $this-> get_render_attribute_string('designation'); ?>><?php echo esc_html( $settings['designation'] ); ?></span> </div> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Team );
[-] 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]