start_controls_section( 'header_section', [ 'label' => __('Header', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'header_title', [ 'label' => __('Title', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Pricing Plans', 'addonnest'), ] ); $this->add_control( 'header_description', [ 'label' => __('Description', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => __('Worried about choosing the right package? Choose from multiple pricing options and get your project off the bench with the pricing plan that works best for you.', 'addonnest'), ] ); $this->end_controls_section(); // Tabs Section $this->start_controls_section( 'tabs_section', [ 'label' => __('Tabs', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $tabs_repeater = new \Elementor\Repeater(); $tabs_repeater->add_control( 'tab_title', [ 'label' => __('Tab Title', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Templates', 'addonnest'), ] ); $tabs_repeater->add_control( 'tab_icon', [ 'label' => __('Tab Icon', 'addonnest'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'fa fa-cube', 'library' => 'solid', ], ] ); // Plans for this tab $plans_repeater = new \Elementor\Repeater(); $plans_repeater->add_control( 'plan_title', [ 'label' => __('Plan Title', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Personal', 'addonnest'), ] ); $plans_repeater->add_control( 'recommended', [ 'label' => __('Recommended', 'addonnest'), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __('Yes', 'addonnest'), 'label_off' => __('No', 'addonnest'), 'return_value' => 'yes', 'default' => 'no', ] ); $plans_repeater->add_control( 'recommended_text', [ 'label' => __('Recommended Text', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Recommend', 'addonnest'), 'condition' => [ 'recommended' => 'yes', ], ] ); $plans_repeater->add_control( 'license', [ 'label' => __('License', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('3 Websites License', 'addonnest'), ] ); $plans_repeater->add_control( 'price', [ 'label' => __('Price', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('$ 99', 'addonnest'), ] ); // Features with icons $features_repeater = new \Elementor\Repeater(); $features_repeater->add_control( 'feature_text', [ 'label' => __('Feature Text', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Access to All Templates', 'addonnest'), ] ); $features_repeater->add_control( 'feature_icon', [ 'label' => __('Feature Icon', 'addonnest'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'fa fa-check', 'library' => 'solid', ], ] ); $features_repeater->add_control( 'icon_color', [ 'label' => __('Icon Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#4CAF50', ] ); $plans_repeater->add_control( 'features', [ 'label' => __('Features', 'addonnest'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $features_repeater->get_controls(), 'default' => [ [ 'feature_text' => __('Access to All Templates', 'addonnest'), 'feature_icon' => ['value' => 'fa fa-check', 'library' => 'solid'], 'icon_color' => '#4CAF50', ], [ 'feature_text' => __('SP Page Builder Pro', 'addonnest'), 'feature_icon' => ['value' => 'fa fa-check', 'library' => 'solid'], 'icon_color' => '#4CAF50', ], [ 'feature_text' => __('No Access to EasyStore', 'addonnest'), 'feature_icon' => ['value' => 'fa fa-times', 'library' => 'solid'], 'icon_color' => '#ff5555', ], ], 'title_field' => '{{{ feature_text }}}', ] ); $plans_repeater->add_control( 'button_text', [ 'label' => __('Button Text', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('Buy Now', 'addonnest'), ] ); $plans_repeater->add_control( 'button_link', [ 'label' => __('Button Link', 'addonnest'), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => __('https://your-link.com', 'addonnest'), ] ); $tabs_repeater->add_control( 'plans', [ 'label' => __('Plans', 'addonnest'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $plans_repeater->get_controls(), 'default' => [ [ 'plan_title' => __('Personal', 'addonnest'), 'license' => __('3 Websites License', 'addonnest'), 'price' => __('$ 99', 'addonnest'), 'button_text' => __('Buy Now', 'addonnest'), ], [ 'plan_title' => __('Business', 'addonnest'), 'recommended' => 'yes', 'license' => __('10 Websites License', 'addonnest'), 'price' => __('$ 199', 'addonnest'), 'button_text' => __('Buy Now', 'addonnest'), ], [ 'plan_title' => __('Agency', 'addonnest'), 'license' => __('Unlimited Websites License', 'addonnest'), 'price' => __('$ 399', 'addonnest'), 'button_text' => __('Buy Now', 'addonnest'), ], ], 'title_field' => '{{{ plan_title }}}', ] ); $this->add_control( 'tabs', [ 'label' => __('Tabs', 'addonnest'), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $tabs_repeater->get_controls(), 'default' => [ [ 'tab_title' => __('Templates', 'addonnest'), 'tab_icon' => ['value' => 'fa fa-cube', 'library' => 'solid'], ], [ 'tab_title' => __('Page Builder', 'addonnest'), 'tab_icon' => ['value' => 'fa fa-cubes', 'library' => 'solid'], ], ], 'title_field' => '{{{ tab_title }}}', ] ); $this->end_controls_section(); // Footer Section $this->start_controls_section( 'footer_section', [ 'label' => __('Footer', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'footer_note', [ 'label' => __('Footer Note', 'addonnest'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __('(*Prices in USD & exclude VAT/Taxes)', 'addonnest'), ] ); $this->end_controls_section(); // Heading Style $this->start_controls_section( 'heading_section', [ 'label' => __('Header Style', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'Pricing_title_color', [ 'label' => __( 'Title Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plans-header h2' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'price_typography', 'selector' => '{{WRAPPER}} .pricing-plans-header h2', ] ); $this->add_responsive_control( 'title_space', [ 'label' => esc_html__( 'Spacing', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 5, ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plans-header h2' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'first_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_control( 'description_color', [ 'label' => __( 'Description Color', 'addonnest' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plans-header p' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Description Typography', 'addonnest' ), 'name' => 'description_typography', 'selector' => '{{WRAPPER}} .pricing-plans-header p', ] ); $this->add_responsive_control( 'description_space', [ 'label' => esc_html__( 'Spacing', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 40, ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plans-header p' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Pricing Table $this->start_controls_section( 'pricing_table_tab_section', [ 'label' => __('Tabs', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); // Pricing Table Header Section $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Tab Typography', 'addonnest' ), 'name' => 'table_tab_typography', 'selector' => '{{WRAPPER}} .feature-tab', ] ); $this->add_control( 'table_tab_background_color', [ 'label' => __('Tab Background Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .features-tabs' => 'background-color: {{VALUE}};', ], 'default' => '#ffffff', ] ); $this->add_control( 'active_tab_color', [ 'label' => __('Tab Active Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .features-tabs .feature-tab.active' => 'background: {{VALUE}}; border-bottom-color: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_control( 'tab_hover_color', [ 'label' => __('Tab Hover Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .features-tabs .feature-tab:hover' => 'background: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_control( 'tab_text_color', [ 'label' => __('Text Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plans-header .features-tabs .feature-tab' => 'color: {{VALUE}};', '{{WRAPPER}} .pricing-plans-header .features-tabs .feature-tab svg' => 'fill: {{VALUE}};', ], 'default' => '#000', ] ); $this->add_control( 'tab_active_text_color', [ 'label' => __('Text Active/Hover Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plans-header .features-tabs .feature-tab:hover' => 'color: {{VALUE}};', '{{WRAPPER}} .pricing-plans-header .features-tabs .feature-tab.active' => 'color: {{VALUE}};', '{{WRAPPER}} .pricing-plans-header .features-tabs .feature-tab.active svg' => 'fill: {{VALUE}};', ], 'default' => '#ffffff', ] ); $this->add_responsive_control( 'border_width', [ 'label' => esc_html__( 'Border Width', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 10, ], ], 'selectors' => [ '{{WRAPPER}} .features-tabs' => 'border-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'divider_type', [ 'label' => __( 'Border Type', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'dotted', 'options' => [ 'solid' => __( 'Solid', 'addonnest' ), 'dotted' => __( 'Dotted', 'addonnest' ), 'dashed' => __( 'dashed', 'addonnest' ), ], 'selectors' => [ '{{WRAPPER}} .features-tabs' => 'border-style: {{VALUE}};', ], ] ); $this->add_control( 'table_border_color', [ 'label' => __('Border Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .features-tabs' => 'border-color: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_responsive_control( 'pricing_table_spacing', [ 'label' => esc_html__( 'Table spacing', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'default' => [ 'size' => 50, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 1000, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plans-header' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'second_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->end_controls_section(); // Pricing Table $this->start_controls_section( 'pricing_table_section', [ 'label' => __('Pricing Table Content', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'table_background_color', [ 'label' => __('Background Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plan' => 'background: {{VALUE}};', ], 'default' => '#ffffff', ] ); $this->add_control( 'table_content_type', [ 'label' => __( 'Border Type', 'addonnest' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'solid', 'options' => [ 'solid' => __( 'Solid', 'addonnest' ), 'dotted' => __( 'Dotted', 'addonnest' ), 'dashed' => __( 'dashed', 'addonnest' ), ], 'selectors' => [ '{{WRAPPER}} .pricing-plan' => 'border-style: {{VALUE}};', ], ] ); $this->add_control( 'table_content_border_color', [ 'label' => __('Border Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plan' => 'border-color: {{VALUE}};', ], 'default' => '#00000036', ] ); $this->add_control( 'third_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Title Typography', 'addonnest' ), 'name' => 'table_title_typography', 'selector' => '{{WRAPPER}} .pricing-plan h3', ] ); $this->add_control( 'table_title_color', [ 'label' => __('Title Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plan h3' => 'color: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_control( 'title_spacing', [ 'label' => __('Title Spacing', 'addonnest'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px'], 'default' => [ 'size' => 0, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plan h3' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'fourth_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Licence Typography', 'addonnest' ), 'name' => 'table_licencee_typography', 'selector' => '{{WRAPPER}} .pricing-plan .license', ] ); $this->add_control( 'table_licence_color', [ 'label' => __('Licence Text Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plan .license' => 'color: {{VALUE}};', ], 'default' => '#666666', ] ); $this->add_control( 'licence_spacing', [ 'label' => __('Picence Spacing', 'addonnest'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px'], 'default' => [ 'size' => 0, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plan .license' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'fiveth_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Price Typography', 'addonnest' ), 'name' => 'table_price_typography', 'selector' => '{{WRAPPER}} .pricing-plan .price', ] ); $this->add_control( 'table_price_color', [ 'label' => __('Price Text Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plan .price' => 'color: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_control( 'price_spacing', [ 'label' => __('Price Spacing', 'addonnest'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px'], 'default' => [ 'size' => 20, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plan .price' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'sixth_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_control( 'feature_icon_size', [ 'label' => __('Feature Icon Size', 'addonnest'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 30, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plan .features li i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Features Typography', 'addonnest' ), 'name' => 'table_list_text_typography', 'selector' => '{{WRAPPER}} .pricing-plan .features li', ] ); $this->add_control( 'table_list_text_color', [ 'label' => __('Features Text Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-plan .features li' => 'color: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_control( 'list_items_spacing', [ 'label' => __('Features Item Spacing', 'addonnest'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px'], 'default' => [ 'size' => 8, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plan .features li' => 'padding: {{SIZE}}{{UNIT}} 0;', '{{WRAPPER}} .pricing-plan .features li:first-child' => 'padding-top: 0;', '{{WRAPPER}} .pricing-plan .features li:last-child' => 'padding-bottom: 0;', ], ] ); $this->add_control( 'recommanded_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __( 'Recommend Typography', 'addonnest' ), 'name' => 'recommended_typography', 'selector' => '{{WRAPPER}} .pricing-tabs-content .recommended-badge', ] ); $this->add_control( 'recommend_bg_color', [ 'label' => __('Recommend Background Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-tabs-content .recommended-badge' => 'background: {{VALUE}};', ], 'default' => '#000000', ] ); $this->add_control( 'recommend_text_color', [ 'label' => __('Recommend Text Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pricing-tabs-content .recommended-badge' => 'color: {{VALUE}};', ], 'default' => '#ffffff', ] ); $this->add_responsive_control( 'recommended_align', [ 'label' => esc_html__( 'Alignment', 'addonnest' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'addonnest' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'addonnest' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'addonnest' ), 'icon' => 'eicon-text-align-right', ], ] ] ); $this->end_controls_section(); $this->start_controls_section( 'section_table_button_style', [ 'label' => __('Button', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); // Divider $this->add_control( 'seven_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); // Typography $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __('Typography', 'addonnest'), 'name' => 'table_button_typography', 'selector' => '{{WRAPPER}} .buy-button', ] ); // Padding $this->add_responsive_control( 'table_btn_padding', [ 'label' => __('Padding', 'addonnest'), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .buy-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); // Border Radius $this->add_responsive_control( 'table_btn_border_radius', [ 'label' => __('Border Radius', 'addonnest'), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .buy-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); // Border Type $this->add_control( 'table_btn_type', [ 'label' => __('Border Type', 'addonnest'), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'solid', 'options' => [ 'none' => __('None', 'addonnest'), 'solid' => __('Solid', 'addonnest'), 'dotted' => __('Dotted', 'addonnest'), 'dashed' => __('Dashed', 'addonnest'), ], 'selectors' => [ '{{WRAPPER}} .buy-button' => 'border-style: {{VALUE}};', ], ] ); // Border Color $this->add_control( 'table_btn_border_color', [ 'label' => __('Border Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#fafafa', 'selectors' => [ '{{WRAPPER}} .buy-button' => 'border-color: {{VALUE}};', ], ] ); // Tabs for Normal and Hover states $this->start_controls_tabs('table_button_tabs'); $this->start_controls_tab( 'table_btn_normal', [ 'label' => __('Normal', 'addonnest'), ] ); $this->add_control( 'table_btn_color', [ 'label' => __('Background Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#000000', 'selectors' => [ '{{WRAPPER}} .buy-button' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'table_btn_text_color', [ 'label' => __('Text Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .buy-button' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'table_btn_hover', [ 'label' => __('Hover', 'addonnest'), ] ); $this->add_control( 'table_btn_hover_color', [ 'label' => __('Background Hover Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#000000', 'selectors' => [ '{{WRAPPER}} .buy-button:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'table_btn_text_hover_color', [ 'label' => __('Text Hover Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .buy-button:hover' => 'color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'section_table_footer_style', [ 'label' => __('Footer', 'addonnest'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'label' => __('Typography', 'addonnest'), 'name' => 'table_footer_note_typography', 'selector' => '{{WRAPPER}} .pricing-plans-footer p', ] ); $this->add_control( 'table_footer_note_color', [ 'label' => __('Footer Note Color', 'addonnest'), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#999999', 'selectors' => [ '{{WRAPPER}} .pricing-plans-footer p' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'footer_note_spacing', [ 'label' => __('Footer Note Spacing', 'addonnest'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px'], 'default' => [ 'size' => 40, ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 300, ], ], 'selectors' => [ '{{WRAPPER}} .pricing-plans-footer p' => 'margin-top: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $tabs = $settings['tabs']; $recommended_align = $settings['recommended_align']; $first_tab_id = !empty($tabs) ? sanitize_title($tabs[0]['tab_title']) : ''; echo '
'; // Header echo '
'; echo '

' . wp_kses_post($settings['header_title']) . '

'; echo '

' . wp_kses_post($settings['header_description']) . '

'; // Features tabs if (!empty($tabs)) { echo '
'; foreach ($tabs as $index => $tab) { $active_class = $index === 0 ? ' active' : ''; $tab_id = sanitize_title($tab['tab_title']); echo '
'; // Display icon if set if (!empty($tab['tab_icon']['value'])) { \Elementor\Icons_Manager::render_icon($tab['tab_icon'], ['aria-hidden' => 'true']); echo ' '; } echo wp_kses_post($tab['tab_title']); echo '
'; } echo '
'; } echo '
'; // Plans containers (one per tab) if (!empty($tabs)) { echo '
'; foreach ($tabs as $index => $tab) { $active_class = $index === 0 ? ' active' : ''; $tab_id = sanitize_title($tab['tab_title']); echo '
'; echo '
'; if (!empty($tab['plans'])) { foreach ($tab['plans'] as $plan) { $recommended_class = $plan['recommended'] === 'yes' ? ' recommended' : ''; echo '
'; if ($plan['recommended'] === 'yes') { echo ''; } echo '

' . wp_kses_post($plan['plan_title']) . '

'; echo '

' . wp_kses_post($plan['license']) . '

'; echo '
' . wp_kses_post($plan['price']) . '
'; if (!empty($plan['features'])) { echo '
    '; foreach ($plan['features'] as $feature) { echo '
  • '; if (!empty($feature['feature_icon']['value'])) { \Elementor\Icons_Manager::render_icon($feature['feature_icon'], ['aria-hidden' => 'true']); echo ' '; } echo wp_kses_post($feature['feature_text']); echo '
  • '; } echo '
'; } if (!empty($plan['button_text'])) { $target = $plan['button_link']['is_external'] ? ' target="_blank"' : ''; $nofollow = $plan['button_link']['nofollow'] ? ' rel="nofollow"' : ''; echo '' . wp_kses_post($plan['button_text']) . ''; } echo '
'; } } echo '
'; echo '
'; // .pricing-tab-content } echo '
'; // .pricing-tabs-content } // Footer if (!empty($settings['footer_note'])) { echo ''; } echo '
'; } protected function _content_template() { ?>

{{{ settings.header_title }}}

{{{ settings.header_description }}}

<# if (settings.tabs.length) { #>
<# _.each(settings.tabs, function(tab, index) { #>
<# if (tab.tab_icon.value) { #> <# } #> {{{ tab.tab_title }}}
<# }); #>
<# } #>
<# if (settings.tabs.length) { #>
<# _.each(settings.tabs, function(tab, index) { #>
<# _.each(tab.plans, function(plan) { #>
<# if (plan.recommended === 'yes') { #> <# } #>

{{{ plan.plan_title }}}

{{{ plan.license }}}

{{{ plan.price }}}
<# if (plan.features.length) { #>
    <# _.each(plan.features, function(feature) { #>
  • <# if (feature.feature_icon.value) { #> <# } #> {{{ feature.feature_text }}}
  • <# }); #>
<# } #> <# if (plan.button_text) { #> {{{ plan.button_text }}} <# } #>
<# }); #>
<# }); #>
<# } #> <# if (settings.footer_note) { #> <# } #>
widgets_manager->register_widget_type( new AddonNest_Pricing_Plans_Widget() );