File: //proc/self/root/proc/self/cwd/wp-content/themes/consultio/elementor/core/register/ct_banner.php
<?php
// Register Banner Box Widget
ct_add_custom_widget(
array(
'name' => 'ct_banner',
'title' => esc_html__('Case Banner', 'consultio' ),
'icon' => 'eicon-info-box',
'categories' => array( Case_Theme_Core::CT_CATEGORY_NAME ),
'scripts' => array(
'jquery-numerator',
'ct-counter-widget-js',
),
'params' => array(
'sections' => array(
array(
'name' => 'layout_section',
'label' => esc_html__('Layout', 'consultio' ),
'tab' => \Elementor\Controls_Manager::TAB_LAYOUT,
'controls' => array(
array(
'name' => 'layout',
'label' => esc_html__('Templates', 'consultio' ),
'type' => Case_Theme_Core::LAYOUT_CONTROL,
'default' => '1',
'options' => [
'1' => [
'label' => esc_html__('Layout 1', 'consultio' ),
'image' => get_template_directory_uri() . '/elementor/templates/widgets/ct_banner/layout-image/layout1.jpg'
],
'2' => [
'label' => esc_html__('Layout 2', 'consultio' ),
'image' => get_template_directory_uri() . '/elementor/templates/widgets/ct_banner/layout-image/layout2.jpg'
],
'3' => [
'label' => esc_html__('Layout 3', 'consultio' ),
'image' => get_template_directory_uri() . '/elementor/templates/widgets/ct_banner/layout-image/layout3.jpg'
],
'4' => [
'label' => esc_html__('Layout 4', 'consultio' ),
'image' => get_template_directory_uri() . '/elementor/templates/widgets/ct_banner/layout-image/layout4.jpg'
],
'5' => [
'label' => esc_html__('Layout 5', 'consultio' ),
'image' => get_template_directory_uri() . '/elementor/templates/widgets/ct_banner/layout-image/layout5.jpg'
],
],
),
),
),
array(
'name' => 'content_section',
'label' => esc_html__('Banner Box', 'consultio' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
'controls' => array(
array(
'name' => 'image',
'label' => esc_html__('Banner Image', 'consultio' ),
'type' => \Elementor\Controls_Manager::MEDIA,
),
array(
'name' => 'thumbnail',
'label' => esc_html__('Image Size', 'consultio' ),
'type' => \Elementor\Group_Control_Image_Size::get_type(),
'control_type' => 'group',
'default' => 'full',
'condition' => [
'layout' => ['1','2','3'],
],
),
array(
'name' => 'img_size',
'label' => esc_html__('Image Size', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'description' => 'Enter image size (Example: "thumbnail", "medium", "large", "full" or other sizes defined by theme). Alternatively enter size in pixels (Example: 200x100 (Width x Height).',
'condition' => [
'layout' => '4',
],
),
array(
'name' => 'title',
'label' => esc_html__('Title', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
),
array(
'name' => 'desc',
'label' => esc_html__('Description', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'rows' => 10,
'show_label' => false,
'condition' => [
'layout' => ['2','4']
],
),
array(
'name' => 'icon_image',
'label' => esc_html__('Icon Image', 'consultio' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'condition' => [
'layout' => '2',
],
),
array(
'name' => 'number',
'label' => esc_html__('Number', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'condition' => [
'layout' => '3',
],
),
array(
'name' => 'counter_icon',
'label' => esc_html__('Counter Icon', 'consultio' ),
'type' => \Elementor\Controls_Manager::ICONS,
'fa4compatibility' => 'icon',
'condition' => [
'layout' => '3',
],
),
array(
'name' => 'counter_number',
'label' => esc_html__('Counter Number', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'condition' => [
'layout' => '3',
],
),
array(
'name' => 'counter_title',
'label' => esc_html__('Counter Title', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'condition' => [
'layout' => '3',
],
),
array(
'name' => 'counter_suffix',
'label' => esc_html__('Counter Suffix', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'condition' => [
'layout' => '3',
],
),
array(
'name' => 'video_link',
'label' => esc_html__('Video Link', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'condition' => [
'layout' => '5',
],
),
array(
'name' => 'video_image',
'label' => esc_html__('Video Image', 'consultio' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'condition' => [
'layout' => '5',
],
),
array(
'name' => 'ct_animate',
'label' => esc_html__('Case Animate', 'consultio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => consultio_animate(),
'default' => '',
),
array(
'name' => 'ct_animate_delay',
'label' => esc_html__('Animate Delay', 'consultio' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => '0',
'description' => 'Enter number. Default 0ms',
),
),
),
),
),
),
get_template_directory() . '/elementor/core/widgets/'
);