<?php
$templates = agenzio_get_templates_option('tab', []) ;
pxl_add_custom_widget(
array(
'name' => 'pxl_tabs',
'title' => esc_html__( 'Case Tabs', 'agenzio' ),
'icon' => 'eicon-tabs',
'categories' => array('pxltheme-core'),
'scripts' => array(
'agenzio-tabs'
),
'params' => array(
'sections' => array(
array(
'name' => 'tab_content',
'label' => esc_html__( 'Tabs', 'agenzio' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
'controls' => array(
array(
'name' => 'tab_active',
'label' => esc_html__( 'Active Tab', 'agenzio' ),
'type' => \Elementor\Controls_Manager::NUMBER,
'default' => 1,
'separator' => 'after',
),
array(
'name' => 'tabs',
'label' => esc_html__( 'Content', 'agenzio' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'controls' => array(
array(
'name' => 'title',
'label' => esc_html__( 'Title', 'agenzio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'label_block' => true,
),
array(
'name' => 'content_type',
'label' => esc_html__('Content Type', 'agenzio'),
'type' => 'select',
'options' => [
'df' => esc_html__( 'Default', 'agenzio' ),
'template' => esc_html__( 'From Template Builder', 'agenzio' )
],
'default' => 'df'
),
array(
'name' => 'desc',
'label' => esc_html__( 'Content', 'agenzio' ),
'type' => \Elementor\Controls_Manager::WYSIWYG,
'condition' => ['content_type' => 'df']
),
array(
'name' => 'content_template',
'label' => esc_html__('Select Template', 'agenzio'),
'type' => 'select',
'options' => $templates,
'default' => 'df',
'description' => 'Add new tab template: "<a href="' . esc_url( admin_url( 'edit.php?post_type=pxl-template' ) ) . '" target="_blank">Click Here</a>"',
'condition' => ['content_type' => 'template']
),
),
'title_field' => '{{{ title }}}',
),
array(
'name' => 'max_width',
'label' => esc_html__('Content Max Width', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SLIDER,
'control_type' => 'responsive',
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 300,
],
],
'selectors' => [
'{{WRAPPER}} .pxl-tabs .pxl-tabs--content' => 'max-width: {{SIZE}}{{UNIT}};',
],
),
),
),
array(
'name' => 'tab_style',
'label' => esc_html__( 'Style', 'agenzio' ),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
'controls' => array(
array(
'name' => 'style',
'label' => esc_html__('Style', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'style-1' => 'Style 1',
'style-2' => 'Style 2',
],
'default' => 'style-1',
),
array(
'name' => 'tab_effect',
'label' => esc_html__('Effect', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'tab-effect-slide' => 'Slide',
'tab-effect-fade' => 'Fade',
],
'default' => 'tab-effect-slide',
),
array(
'name' => 'title_color',
'label' => esc_html__('Title Color', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-tabs .pxl-tab--title' => 'color: {{VALUE}};',
],
),
array(
'name' => 'title_active_color',
'label' => esc_html__('Title Active Color', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-tabs .pxl-tab--title.active' => 'color: {{VALUE}};',
],
),
array(
'name' => 'title_typography',
'label' => esc_html__('Title Typography', 'agenzio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .pxl-tabs .pxl-tab--title',
'separator' => 'after',
),
array(
'name' => 'content_color',
'label' => esc_html__('Content Color', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-tabs .pxl-tab--content' => 'color: {{VALUE}};',
],
),
array(
'name' => 'content_typography',
'label' => esc_html__('Content Typography', 'agenzio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .pxl-tabs .pxl-tab--content',
),
array(
'name' => 'content_space_Top',
'label' => esc_html__('Content Top Spacer', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SLIDER,
'control_type' => 'responsive',
'size_units' => [ 'px' ],
'default' => [
'size' => 0,
],
'range' => [
'px' => [
'min' => 0,
'max' => 300,
],
],
'selectors' => [
'{{WRAPPER}} .pxl-tabs .pxl-tabs--content' => 'margin-top: {{SIZE}}{{UNIT}};',
],
'separator' => 'after',
),
),
),
agenzio_widget_animation_settings(),
),
),
),
agenzio_get_class_widget_path()
); Back to Directory