Submit
Path:
~
/
home
/
getwphos
/
www
/
radkingpanels
/
wp-content
/
plugins
/
poolax-core
/
addons
/
widgets
/
File Content:
poolax-tab-builder.php
<?php use \Elementor\Widget_Base; use \Elementor\Controls_Manager; use \Elementor\Group_Control_Typography; use \Elementor\Repeater; use \Elementor\Utils; use \Elementor\Group_Control_Border; /** * * Tab Builder Widget . * */ class poolax_Tab_Builder extends Widget_Base { public function get_name() { return 'poolaxtabbuilder'; } public function get_title() { return __( 'Tab Builder', 'poolax' ); } public function get_icon() { return 'th-icon'; } public function get_categories() { return [ 'poolax' ]; } protected function register_controls() { $this->start_controls_section( 'tab_builder_section', [ 'label' => __( 'Tab Builder', 'poolax' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'layout_style', [ 'label' => __( 'Layout Style', 'poolax' ), 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => __( 'Style One', 'poolax' ), ], ] ); $repeater = new Repeater(); poolax_general_fields($repeater, 'tab_builder_text', 'Tab Builder Title', 'TEXTAREA', 'Tab Title'); $repeater->add_control( 'poolax_tab_builder_option', [ 'label' => __( 'Tab Name', 'poolax' ), 'type' => Controls_Manager::SELECT, 'options' => $this->poolax_tab_builder_choose_option(), 'default' => '' ] ); $this->add_control( 'tab_builder_repeater', [ 'label' => __( 'Tab', 'poolax' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'tab_builder_text' => __( 'Residential Pool Services', 'poolax' ), ], ], 'title_field' => '{{{ tab_builder_text }}}', ] ); $this->end_controls_section(); //--------------------------------------- //Style Section Start //--------------------------------------- } public function poolax_tab_builder_choose_option(){ $poolax_post_query = new WP_Query( array( 'post_type' => 'poolax_tab_builder', 'posts_per_page' => -1, ) ); $poolax_tab_builder_title = array(); $poolax_tab_builder_title[''] = __( 'Select a Tab','Foodelio'); while( $poolax_post_query->have_posts() ) { $poolax_post_query->the_post(); $poolax_tab_builder_title[ get_the_ID() ] = get_the_title(); } wp_reset_postdata(); return $poolax_tab_builder_title; } protected function render() { $settings = $this->get_settings_for_display(); if( $settings['layout_style'] == '2' ){ }else{ echo '<div class="nav nav-tabs service-tabs" id="nav-tab" role="tablist">'; $x = 0; foreach( $settings['tab_builder_repeater'] as $single_menu ){ $x++; $active = $x == '1' ? 'active':''; echo '<button class="nav-link th-btn '.$active.'" id="nav-step'.esc_attr($x).'-tab" data-bs-toggle="tab" data-bs-target="#nav-step'.esc_attr($x).'" type="button">'.esc_html( $single_menu['tab_builder_text'] ).'</button>'; } echo '</div>'; echo '<div class="tab-content" id="nav-tabContent">'; $x = 0; foreach( $settings['tab_builder_repeater'] as $single_menu ){ $x++; $active = $x == '1' ? 'active show':''; echo '<div class="tab-pane fade '.$active.'" id="nav-step'.esc_attr($x).'" role="tabpanel">'; $elementor = \Elementor\Plugin::instance(); if( ! empty( $single_menu['poolax_tab_builder_option'] ) ){ echo $elementor->frontend->get_builder_content_for_display( $single_menu['poolax_tab_builder_option'] ); } echo '</div>'; } echo '</div>'; } } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
poolax-about-us.php
11054 bytes
0644
poolax-animated-shape.php
5700 bytes
0644
poolax-arrows.php
2016 bytes
0644
poolax-banner.php
24342 bytes
0644
poolax-banner2.php
11984 bytes
0644
poolax-blog.php
29013 bytes
0644
poolax-brand-logo.php
4578 bytes
0644
poolax-button.php
5216 bytes
0644
poolax-choose-us.php
11970 bytes
0644
poolax-choose.php
14048 bytes
0644
poolax-classes.php
6523 bytes
0644
poolax-contact-form.php
10525 bytes
0644
poolax-contact-info.php
13756 bytes
0644
poolax-counterup.php
10646 bytes
0644
poolax-cta.php
6743 bytes
0644
poolax-download-button.php
2675 bytes
0644
poolax-faq.php
9485 bytes
0644
poolax-features.php
18133 bytes
0644
poolax-footer-widgets.php
2660 bytes
0644
poolax-gallery-filter.php
4974 bytes
0644
poolax-gallery.php
12033 bytes
0644
poolax-image.php
11605 bytes
0644
poolax-info-box.php
11747 bytes
0644
poolax-marquee.php
4578 bytes
0644
poolax-menu-select.php
4451 bytes
0644
poolax-newsletter.php
13804 bytes
0644
poolax-offer.php
3931 bytes
0644
poolax-portfolio-info.php
6899 bytes
0644
poolax-portfolio.php
11562 bytes
0644
poolax-price.php
4725 bytes
0644
poolax-section-title.php
6036 bytes
0644
poolax-service-list.php
2526 bytes
0644
poolax-service.php
19858 bytes
0644
poolax-skill.php
4691 bytes
0644
poolax-social.php
2730 bytes
0644
poolax-step.php
11915 bytes
0644
poolax-tab-builder.php
3744 bytes
0644
poolax-team-info.php
3873 bytes
0644
poolax-team.php
31875 bytes
0644
poolax-testimonial.php
38256 bytes
0644
poolax-video.php
3149 bytes
0644
N4ST4R_ID | Naxtarrr