<?php
// 'pxl-splitting',
// 'pxl-typography-animation',
pxl_add_custom_widget(
array(
'name' => 'pxl_heading',
'title' => esc_html__('Case Heading', 'agenzio' ),
'icon' => 'eicon-heading',
'categories' => array('pxltheme-core'),
'scripts' => array(
'gsap',
'pxl-scroll-trigger',
'pxl-splitText',
),
'params' => array(
'sections' => array(
array(
'name' => 'section_content',
'label' => esc_html__('Content', 'agenzio' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
'controls' => array(
array(
'name' => 'source_type',
'label' => esc_html__('Source Type', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'text' => 'Text',
'title' => 'Page Title',
],
'default' => 'text',
),
array(
'name' => 'title',
'label' => esc_html__('Title', 'agenzio' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'label_block' => true,
'condition' => [
'source_type' => ['text'],
],
'description' => 'Create Typewriter text width shortcode: [typewriter text="Text1, Text2"], Highlight text with shortcode: [highlight text="Text"] and Highlight image with shortcode: [highlight_image id_image="123"]',
),
array(
'name' => 'sub_title',
'label' => esc_html__('Sub Title', 'agenzio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'label_block' => true,
),
array(
'name' => 'align',
'label' => esc_html__( 'Alignment', 'agenzio' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'control_type' => 'responsive',
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'agenzio' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'agenzio' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'agenzio' ),
'icon' => 'eicon-text-align-right',
],
'justify' => [
'title' => esc_html__( 'Justified', 'agenzio' ),
'icon' => 'eicon-text-align-justify',
],
],
'selectors' => [
'{{WRAPPER}} .pxl-heading' => 'text-align: {{VALUE}};',
],
),
array(
'name' => 'max_width',
'label' => esc_html__('Max Width', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SLIDER,
'control_type' => 'responsive',
'size_units' => [ 'px', '%' ],
'range' => [
'px' => [
'min' => 0,
'max' => 3000,
],
],
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-heading--inner' => 'max-width: {{SIZE}}{{UNIT}};',
],
),
),
),
array(
'name' => 'section_style_title',
'label' => esc_html__('Title', 'agenzio' ),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
'controls' => array(
array(
'name' => 'title_tag',
'label' => esc_html__('HTML Tag', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'h1' => 'H1',
'h2' => 'H2',
'h3' => 'H3',
'h4' => 'H4',
'h5' => 'H5',
'h6' => 'H6',
'div' => 'div',
'span' => 'span',
'p' => 'p',
],
'default' => 'h3',
),
array(
'name' => 'title_color',
'label' => esc_html__('Title Color', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--title' => 'color: {{VALUE}};-webkit-text-stroke-color:{{VALUE}};',
'{{WRAPPER}} .pxl-heading .pxl-item--title.style-outline .pxl-text-line-backdrop svg' => 'stroke:{{VALUE}};',
],
),
array(
'name' => 'title_typography',
'label' => esc_html__('Typography', 'agenzio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .pxl-heading .pxl-item--title',
),
array(
'name' => 'title_box_shadow',
'label' => esc_html__( 'Title Shadow', 'agenzio' ),
'type' => \Elementor\Group_Control_Text_Shadow::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .pxl-heading .pxl-item--title'
),
array(
'name' => 'title_space_bottom',
'label' => esc_html__('Bottom 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-heading .pxl-item--title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
'separator' => 'after',
),
array(
'name' => 'h_title_style',
'label' => esc_html__('Style', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'style-default' => 'Default',
'style-outline' => 'Outline',
'style-shape' => 'Shape',
'style-border' => 'Border',
],
'default' => 'style-default',
),
array(
'name' => 'color_shape1',
'label' => esc_html__('Color Shape 1', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--title.style-shape .pxl-heading--shape::before' => 'background-color: {{VALUE}};',
],
'condition' => [
'h_title_style' => ['style-shape'],
],
),
array(
'name' => 'color_shape2',
'label' => esc_html__('Color Shape 2', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--title.style-shape .pxl-heading--shape::after' => 'background-color: {{VALUE}};',
],
'condition' => [
'h_title_style' => ['style-shape'],
],
),
array(
'name' => 'shape_space_top',
'label' => esc_html__('Shape Top Spacer', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SLIDER,
'control_type' => 'responsive',
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 300,
],
],
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--title.style-shape .pxl-heading--shape' => 'margin-top: {{SIZE}}{{UNIT}};',
],
'condition' => [
'h_title_style' => ['style-shape'],
],
),
array(
'name' => 'align_items',
'label' => esc_html__('Shape Align Items', 'agenzio' ),
'type' => \Elementor\Controls_Manager::CHOOSE,
'control_type' => 'responsive',
'options' => [
'flex-start' => [
'title' => esc_html__( 'Flex Start', 'agenzio' ),
'icon' => 'far fa-arrow-alt-to-top',
],
'Center' => [
'title' => esc_html__( 'Center', 'agenzio' ),
'icon' => 'far fa-arrows-alt-v',
],
'flex-end' => [
'title' => esc_html__( 'Flex End', 'agenzio' ),
'icon' => 'far fa-arrow-alt-to-bottom',
],
],
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--title.style-shape' => 'align-items: {{VALUE}};',
],
'condition' => [
'h_title_style' => ['style-shape'],
],
),
array(
'name' => 'pxl_animate',
'label' => esc_html__('Case Animate', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => agenzio_widget_animate_v2(),
'default' => '',
),
array(
'name' => 'pxl_animate_delay',
'label' => esc_html__('Animate Delay', 'agenzio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => '0',
'description' => 'Enter number. Default 0ms',
),
),
),
array(
'name' => 'section_style_title_sub',
'label' => esc_html__('Sub Title', 'agenzio' ),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
'controls' => array_merge(
array(
array(
'name' => 'sub_title_style',
'label' => esc_html__('Style', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'px-sub-title-default' => 'Default',
],
'default' => 'px-sub-title-default',
),
array(
'name' => 'sub_title_color',
'label' => esc_html__('Color', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--subtitle' => 'color: {{VALUE}};',
],
),
array(
'name' => 'sub_title_typography',
'label' => esc_html__('Typography', 'agenzio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .pxl-heading .pxl-item--subtitle, {{WRAPPER}} .pxl-heading .pxl-item--subtitle span',
),
array(
'name' => 'sub_title_space_top',
'label' => esc_html__('Top Spacer', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SLIDER,
'control_type' => 'responsive',
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 300,
],
],
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--subtitle' => 'top: {{SIZE}}{{UNIT}};',
],
),
array(
'name' => 'sub_title_space_bottom',
'label' => esc_html__('Bottom Spacer', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SLIDER,
'control_type' => 'responsive',
'size_units' => [ 'px' ],
'range' => [
'px' => [
'min' => 0,
'max' => 300,
],
],
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-item--subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
),
array(
'name' => 'pxl_animate_sub',
'label' => esc_html__('Case Animate', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => agenzio_widget_animate(),
'default' => '',
),
array(
'name' => 'pxl_animate_delay_sub',
'label' => esc_html__('Animate Delay', 'agenzio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => '0',
'description' => 'Enter number. Default 0ms',
),
)
),
),
array(
'name' => 'section_style_highlight',
'label' => esc_html__('Highlight Text', 'agenzio' ),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
'controls' => array_merge(
array(
array(
'name' => 'highlight_style',
'label' => esc_html__('Style', 'agenzio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'highlight-default' => 'Default',
],
'default' => 'highlight-default',
),
array(
'name' => 'highlight_color',
'label' => esc_html__('Color', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-title--highlight' => 'color: {{VALUE}};',
],
'condition' => [
'highlight_style' => ['highlight-default'],
],
),
array(
'name' => 'highlight_color_to',
'label' => esc_html__('Color To', 'agenzio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .pxl-heading .pxl-title--highlight' => '--gradient-color-to: {{VALUE}};',
],
'condition' => [
'highlight_style' => ['highlight-text-gradient'],
],
),
array(
'name' => 'highlight_typography',
'label' => esc_html__('Typography', 'agenzio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .pxl-heading .pxl-title--highlight',
),
)
),
),
),
),
),
agenzio_get_class_widget_path()
); Back to Directory