templates_manager->get_source( 'local' )->get_items(); $types = array(); if ( empty( $templates ) ) { $template_lists = [ '0' => __( 'Do not Saved Templates.', 'restly' ) ]; } else { $template_lists = [ '0' => __( 'Select Template', 'restly' ) ]; foreach ( $templates as $template ) { $template_lists[ $template['template_id'] ] = $template['title'] . ' (' . $template['type'] . ')'; } } return $template_lists; } protected function register_controls() { //Content tab start $this->start_controls_section( 'restly_pricing_tab2_options', [ 'label' => esc_html__( 'Restly Tabs', 'restlycore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new \Elementor\Repeater(); $repeater->add_control( 'restly_pricing_tab2_active', [ 'label' => esc_html__( 'Active', 'restlycore' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'restlycore' ), 'label_off' => esc_html__( 'Hide', 'restlycore' ), 'return_value' => 'yes', 'default' => 'no', ] ); $repeater->add_control( 'restly_pricing_tab2_title', [ 'label' => esc_html__( 'Title', 'restlycore' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Data Center', 'restlycore' ), 'placeholder' => esc_html__( 'Type your title here', 'restlycore' ), ] ); $repeater->add_responsive_control( 'restly_pricing_tab2_content_source', [ 'label' => esc_html__( 'Content Source', 'restlycore' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'custom', 'options' => [ 'custom' => esc_html__( 'Content', 'restlycore' ), 'elementor' => esc_html__( 'Template', 'restlycore' ), ], 'separator' => 'before', ] ); $repeater->add_control( 'template_id2', [ 'label' => __( 'Content', 'restly' ), 'type' => Controls_Manager::SELECT, 'default' => '0', 'options' => $this->restly_elementor_template(), 'condition' => [ 'restly_pricing_tab2_content_source' => "elementor" ], 'separator' => 'before', ] ); $repeater->add_control( 'restly_pricing_tab2_content_custom', [ 'label' => __( 'Content', 'restly' ), 'type' => Controls_Manager::WYSIWYG, 'title' => __( 'Content', 'restly' ), 'show_label' => false, 'condition' => [ 'restly_pricing_tab2_content_source' => 'custom', ], 'separator' => 'before', ] ); $this->add_control( 'restly_pricing_tab2_list', [ 'label' => esc_html__( 'Tabs', 'restlycore' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'restly_pricing_tab2_title' => '', 'restly_pricing_tab2_content_source' => '', ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'restly_pricing_static_CSS', [ 'label' => esc_html__( 'TAB Style', 'restlycore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'restly_pricing_tab2_box', [ 'label' => __( 'Alignment', 'restlycore' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'restlycore' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'restlycore' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'restlycore' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .pricing-top-area' => 'text-align: {{VALUE}}', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'label' => esc_html__( 'Typography', 'restlycore' ), 'selector' => '{{WRAPPER}} .restly-pricing-tabs-wrapper .pricing-tab.nav button', ] ); $this->add_responsive_control( 'restly_pricing_tab2_ac', [ 'label' => esc_html__( 'Active Color', 'restlycore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .restly-pricing-tabs-wrapper .pricing-tab.nav button.active' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'restly_pricing_tab2_c', [ 'label' => esc_html__( 'Color', 'restlycore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .restly-pricing-tabs-wrapper .pricing-tab.nav button' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'restly_pricing_tab2_list_abg', [ 'label' => esc_html__( 'Icon active BG', 'restlycore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .restly-pricing-tabs-wrapper.pricing-tab-v2-wrapper .nav:after' => 'background-color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'restly_pricing_tab2_bg', [ 'label' => esc_html__( 'Icon BG Color', 'restlycore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .restly-pricing-tabs-wrapper.pricing-tab-v2-wrapper .nav:before' => 'background-color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'restly_pricing_tab2_margin', [ 'label' => esc_html__( 'Margin', 'restlycore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .restly-pricing-tabs-wrapper.pricing-tab-v2-wrapper .nav' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'restly_pricing_tab2_padding', [ 'label' => esc_html__( 'Padding', 'restlycore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .pricing-top-area' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); } //Render protected function render() { $settings = $this->get_settings_for_display(); $unique = rand(350, 540); ob_start(); echo ' '; ?>