PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
core
/
elementor
/
widgets
<?php namespace Elementor; class Webnus_Element_Widgets_Tabs extends \Elementor\Widget_Base { /** * Retrieve Single Cause widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'Tabs'; } /** * Retrieve Single Cause widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return esc_html__( 'Webnus Tab Content', 'deep' ); } /** * Retrieve Single Cause widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'ti-layout-tab'; } /** * Set widget category. * * @since 1.0.0 * @access public * * @return array Widget category. */ public function get_categories() { return [ 'webnus' ]; } public function get_script_depends() { return [ 'tab-content' ]; } /** * Register Single Cause widget controls. * * * @since 1.0.0 * @access protected */ protected function _register_controls() { $tabstpls = Plugin::instance()->templates_manager->get_source( 'local' )->get_items(); $tabstpls_opts = [ '0' => __( 'Elementor template is not defined yet.', 'deep' ) ]; if ( ! empty( $tabstpls ) ) { $tabstpls_opts = [ '0' => __( 'Select elementor template', 'deep' ) ]; foreach ( $tabstpls as $template ) { $tabstpls_opts[$template['template_id']] = $template['title'] . ' (' . $template['type'] . ')'; } } $this->start_controls_section( 'content_section', [ 'label' => esc_html__( 'Tabs', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->add_control( 'tab_item', [ 'label' => __( 'Choose template', 'deep' ), 'type' => Controls_Manager::SELECT, 'default' => '0', 'options' => $tabstpls_opts, 'label_block' => 'true', ] ); $repeater->add_control( 'tab_title', [ 'label' => __( 'Title', 'deep' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Tab title' , 'deep' ), 'label_block' => true, ] ); $repeater->add_control( 'iconname', [ 'label' => __( 'Tab Icon', 'deep' ), 'type' => \Elementor\Controls_Manager::ICON, 'default' => 'li_star', ] ); $this->add_control( 'tabs', [ 'label' => __( 'Repeater List', 'deep' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'tab_title' => __( 'Tab 1', 'deep' ), 'iconname' => __( 'li_star' ), ], [ 'tab_title' => __( 'Tab 2', 'deep' ), 'iconname' => __( 'li_star' ), ], ], 'title_field' => '{{{ tab_title }}}', ] ); $this->end_controls_section(); // Style $this->start_controls_section( 'title_style', [ 'label' => esc_html__( 'Title', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'title_size', [ 'label' => __( 'Title Size', 'deep' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 18, ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu li' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'title_color', //param_name [ 'label' => __( 'Title color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu li' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'title_color_hover', //param_name [ 'label' => __( 'Hover title color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu li:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'title_color_type', //param_name [ 'label' => __( 'Background Color type', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::SELECT, //type 'default' => 'iconbox_solid_color', 'options' => [ //value 'iconbox_solid_color' => __( 'Solid color', 'deep' ), 'iconbox_gradient' => __( 'Gradient', 'deep' ), ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'background_solid', 'label' => __( 'Background Color', 'deep' ), 'types' => [ 'classic' ], 'selector' => '{{WRAPPER}} .deep-tab-content .tab-menu li', 'condition' => [ //dependency 'title_color_type' => [ 'iconbox_solid_color' ], ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'background_gradient', 'label' => __( 'Background', 'deep' ), 'types' => [ 'gradient' ], 'selector' => '{{WRAPPER}} .deep-tab-content .tab-menu li', 'condition' => [ //dependency 'title_color_type' => [ 'iconbox_gradient' ], ], ] ); $this->add_control( 'title_color_type_hover', //param_name [ 'label' => __( 'Hover Background Color type', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::SELECT, //type 'default' => 'title_solid_color_hover', 'options' => [ //value 'title_solid_color_hover' => __( 'Solid color', 'deep' ), 'iconbox_gradient_hover' => __( 'Gradient', 'deep' ), ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'background_solid_hover', 'label' => __( 'Background Color', 'deep' ), 'types' => [ 'classic' ], 'selector' => '{{WRAPPER}} .deep-tab-content .tab-menu li:hover', 'condition' => [ //dependency 'title_color_type_hover' => [ 'title_solid_color_hover' ], ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'background_gradient_hover', 'label' => __( 'Background', 'deep' ), 'types' => [ 'gradient' ], 'selector' => '#wrap {{WRAPPER}} .deep-tab-content .tab-menu li:hover', 'condition' => [ //dependency 'title_color_type_hover' => [ 'iconbox_gradient_hover' ], ], ] ); $this->add_control( 'title_padding', //param_name [ 'label' => __( 'Title padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'title_margin', //param_name [ 'label' => __( 'Title margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'title_radius', //param_name [ 'label' => __( 'Border Radius', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu li' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'title_border', 'label' => __( 'Border', 'deep' ), 'selector' => '{{WRAPPER}} .deep-tab-content .tab-menu li', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'box_shadow', 'label' => __( 'Box Shadow', 'deep' ), 'selector' => '{{WRAPPER}} .deep-tab-content .tab-menu li', ] ); $this->end_controls_section(); $this->start_controls_section( 'icon_style', [ 'label' => esc_html__( 'Icon', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'icon_size', [ 'label' => __( 'Icon Size', 'deep' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 18, ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'icon_padding', //param_name [ 'label' => __( 'Icon padding', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu i' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'icon_margin', //param_name [ 'label' => __( 'Icon margin', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::DIMENSIONS, //type 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu i' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'icon_color', //param_name [ 'label' => __( 'Icon color', 'deep' ), //heading 'type' => \Elementor\Controls_Manager::COLOR, //type 'selectors' => [ '{{WRAPPER}} .deep-tab-content .tab-menu i' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); // Custom css tab $this->start_controls_section( 'custom_css_section', [ 'label' => __( 'Custom CSS', 'deep' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'custom_css', [ 'label' => __( 'Custom CSS', 'deep' ), 'type' => \Elementor\Controls_Manager::CODE, 'language' => 'css', 'rows' => 20, 'show_label' => true, ] ); $this->end_controls_section(); } /** * Render Single Cause widget output on the frontend. * * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings(); $tabs = $settings['tabs']; echo '<div class="deep-tab-content">'; echo '<ul class="tab-menu">'; foreach ( $tabs as $tab ) { echo '<li class="tab-link" data-id="' . sanitize_title( $tab['tab_title'] ) . '">'; echo '<i class="' . esc_attr($tab['iconname']) . '"></i>'; echo $tab['tab_title']; echo '</li>'; } echo '</ul>'; foreach ( $tabs as $tab ) { echo ' <div id="' . sanitize_title( $tab['tab_title'] ) . '" class="tab-content"> ' . Plugin::instance()->frontend->get_builder_content_for_display( $tab['tab_item'] ) . ' </div>'; } echo '</div>'; $custom_css = $settings['custom_css']; if ( $custom_css != '' ) { deep_save_dyn_styles( $custom_css ); if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) { echo '<style>'. $custom_css .'</style>'; } } } }
[+]
..
[-] our-client.php
[edit]
[-] icons.php
[edit]
[-] collection.php
[edit]
[-] testimonial-tab.php
[edit]
[-] teaserbox.php
[edit]
[-] instagram.php
[edit]
[-] our-team.php
[edit]
[-] content-carousel.php
[edit]
[-] videoteaser.php
[edit]
[-] like-view-share.php
[edit]
[-] courses-instructors.php
[edit]
[-] widget-flickr.php
[edit]
[-] reservation.php
[edit]
[-] list.php
[edit]
[-] road-map.php
[edit]
[-] max-counter.php
[edit]
[-] magazine.php
[edit]
[-] prayer-wall-items.php
[edit]
[-] facebook-button.php
[edit]
[-] icon-divider.php
[edit]
[-] featured-products.php
[edit]
[-] review-items.php
[edit]
[-] iconbox.php
[edit]
[-] widget-googleplus.php
[edit]
[-] content-slider.php
[edit]
[-] service-carousel.php
[edit]
[-] contact-form.php
[edit]
[-] twitter-feed.php
[edit]
[-] blog.php
[edit]
[-] process-carousel.php
[edit]
[-] course-category.php
[edit]
[-] virtual-coins.php
[edit]
[-] speakers.php
[edit]
[-] the-grid.php
[edit]
[-] custom-menu.php
[edit]
[-] widget-youtube.php
[edit]
[-] testimonial.php
[edit]
[-] callout.php
[edit]
[-] testimonial-slider.php
[edit]
[-] category-tab.php
[edit]
[-] testimonial-carousel.php
[edit]
[-] button.php
[edit]
[-] facebook-comments.php
[edit]
[-] widget-login.php
[edit]
[-] subscribe.php
[edit]
[-] googlemap.php
[edit]
[-] widget-social-icon.php
[edit]
[-] postslider.php
[edit]
[-] alert.php
[edit]
[-] video-play-button.php
[edit]
[-] quote.php
[edit]
[-] donate.php
[edit]
[-] dropcap.php
[edit]
[-] before-after-image.php
[edit]
[-] pricing-tables.php
[edit]
[-] facebook-page.php
[edit]
[-] shop-products.php
[edit]
[-] single-goal.php
[edit]
[-] info-box.php
[edit]
[-] latestfromblog.php
[edit]
[-] goals.php
[edit]
[-] revolution-slider.php
[edit]
[-] widget-subscribe.php
[edit]
[-] tablepress.php
[edit]
[-] tab-content.php
[edit]
[-] schedule.php
[edit]
[-] sermon-category.php
[edit]
[-] pricing-plan.php
[edit]
[-] tabs.php
[edit]
[-] widget-latest-posts.php
[edit]
[-] distance.php
[edit]
[-] widget-popular-posts.php
[edit]
[-] recipes.php
[edit]
[-] causes.php
[edit]
[-] widget-testimonial.php
[edit]
[-] widget-about.php
[edit]
[-] special-offers.php
[edit]
[-] tooltip.php
[edit]
[-] food-menu.php
[edit]
[-] wp-hotel-booking.php
[edit]
[-] widget-tab.php
[edit]
[-] courses.php
[edit]
[-] login.php
[edit]
[-] post-from-blog.php
[edit]
[-] socials.php
[edit]
[-] line.php
[edit]
[-] gallery.php
[edit]
[-] faq.php
[edit]
[-] piecharts.php
[edit]
[-] image-hotspot.php
[edit]
[-] link.php
[edit]
[-] prayer-wall-form.php
[edit]
[-] rooms.php
[edit]
[-] countdown.php
[edit]
[-] portfolio-carousel.php
[edit]
[-] facebook-embed.php
[edit]
[-] single-cause.php
[edit]
[-] review-form.php
[edit]
[-] buy-process.php
[edit]
[-] sermons.php
[edit]
[-] widget-facebook.php
[edit]
[-] single-sermon.php
[edit]
[-] single-course.php
[edit]
[-] image-carousel.php
[edit]
[-] toggle-box.php
[edit]
[-] our-process.php
[edit]
[-] svg.php
[edit]
[-] w-title.php
[edit]
[-] block-quote.php
[edit]