protected function _register_controls() { $this->start_controls_section('section_style', ['label' => __('Background & Border', 'elementor'), 'type' => Controls_Manager::SECTION]); $this->add_group_control(Group_Control_Background::get_type(), ['name' => 'background', 'selector' => '{{WRAPPER}} > .elementor-element-populated']); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'border', 'selector' => '{{WRAPPER}} > .elementor-element-populated']); $this->add_control('border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} > .elementor-element-populated' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_group_control(Group_Control_Box_Shadow::get_type(), ['name' => 'box_shadow', 'selector' => '{{WRAPPER}} > .elementor-element-populated']); $this->end_controls_section(); // Section Typography $this->start_controls_section('section_typo', ['label' => __('Typography', 'elementor'), 'type' => Controls_Manager::SECTION]); $this->add_control('heading_color', ['label' => __('Heading Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-element-populated .elementor-heading-title' => 'color: {{VALUE}};']]); $this->add_control('color_text', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} > .elementor-element-populated' => 'color: {{VALUE}};']]); $this->add_control('color_link', ['label' => __('Link Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-element-populated a' => 'color: {{VALUE}};']]); $this->add_control('color_link_hover', ['label' => __('Link Hover Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-element-populated a:hover' => 'color: {{VALUE}};']]); $this->add_control('text_align', ['label' => __('Text Align', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']], 'selectors' => ['{{WRAPPER}} > .elementor-element-populated' => 'text-align: {{VALUE}};']]); $this->end_controls_section(); // Section Advanced $this->start_controls_section('section_advanced', ['label' => __('Advanced', 'elementor'), 'type' => Controls_Manager::SECTION, 'tab' => Controls_Manager::TAB_ADVANCED]); $this->add_responsive_control('margin', ['label' => __('Margin', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} > .elementor-element-populated' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_responsive_control('padding', ['label' => __('Padding', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => ['{{WRAPPER}} > .elementor-element-populated' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_control('animation', ['label' => __('Entrance Animation', 'elementor'), 'type' => Controls_Manager::ANIMATION, 'default' => '', 'prefix_class' => 'animated ', 'label_block' => true]); $this->add_control('animation_duration', ['label' => __('Animation Duration', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => ['slow' => __('Slow', 'elementor'), '' => __('Normal', 'elementor'), 'fast' => __('Fast', 'elementor')], 'prefix_class' => 'animated-', 'condition' => ['animation!' => '']]); $this->add_control('css_classes', ['label' => __('CSS Classes', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => '', 'prefix_class' => '', 'label_block' => true, 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class', 'elementor')]); $this->end_controls_section(); // Section Responsive $this->start_controls_section('section_responsive', ['label' => __('Responsive', 'elementor'), 'tab' => Controls_Manager::TAB_ADVANCED]); $responsive_points = ['screen_sm' => ['title' => __('Mobile Width', 'elementor'), 'class_prefix' => 'elementor-sm-', 'classes' => '', 'description' => ''], 'screen_xs' => ['title' => __('Mobile Portrait', 'elementor'), 'class_prefix' => 'elementor-xs-', 'classes' => 'elementor-control-deprecated', 'description' => __('Deprecated: Mobile Portrait control is no longer supported. Please use the Mobile Width instead.', 'elementor')]]; foreach ($responsive_points as $point_name => $point_data) { $this->add_control($point_name, ['label' => $point_data['title'], 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => ['default' => __('Default', 'elementor'), 'custom' => __('Custom', 'elementor')], 'description' => $point_data['description'], 'classes' => $point_data['classes']]); $this->add_control($point_name . '_width', ['label' => __('Column Width', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['10' => '10%', '11' => '11%', '12' => '12%', '14' => '14%', '16' => '16%', '20' => '20%', '25' => '25%', '30' => '30%', '33' => '33%', '40' => '40%', '50' => '50%', '60' => '60%', '66' => '66%', '70' => '70%', '75' => '75%', '80' => '80%', '83' => '83%', '90' => '90%', '100' => '100%'], 'default' => '100', 'condition' => [$point_name => ['custom']], 'prefix_class' => $point_data['class_prefix']]); } $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_button', ['label' => __('Button', 'elementor')]); $this->add_control('button_type', ['label' => __('Type', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => ['' => __('Default', 'elementor'), 'info' => __('Info', 'elementor'), 'success' => __('Success', 'elementor'), 'warning' => __('Warning', 'elementor'), 'danger' => __('Danger', 'elementor')]]); $this->add_control('text', ['label' => __('Text', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => __('Click me', 'elementor'), 'placeholder' => __('Click me', 'elementor')]); $this->add_control('link', ['label' => __('Link', 'elementor'), 'type' => Controls_Manager::URL, 'placeholder' => 'http://your-link.com', 'default' => ['url' => '#']]); $this->add_responsive_control('align', ['label' => __('Alignment', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right'], 'justify' => ['title' => __('Justified', 'elementor'), 'icon' => 'align-justify']], 'prefix_class' => 'elementor%s-align-', 'default' => '']); $this->add_control('size', ['label' => __('Size', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'sm', 'options' => self::get_button_sizes()]); $this->add_control('icon', ['label' => __('Icon', 'elementor'), 'type' => Controls_Manager::ICON, 'label_block' => true, 'default' => '']); $this->add_control('icon_align', ['label' => __('Icon Position', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'left', 'options' => ['left' => __('Before', 'elementor'), 'right' => __('After', 'elementor')], 'condition' => ['icon!' => '']]); $this->add_control('icon_indent', ['label' => __('Icon Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['max' => 50]], 'condition' => ['icon!' => ''], 'selectors' => ['{{WRAPPER}} .elementor-button .elementor-align-icon-right' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .elementor-button .elementor-align-icon-left' => 'margin-right: {{SIZE}}{{UNIT}};']]); $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']); $this->end_controls_section(); $this->start_controls_section('section_style', ['label' => __('Button', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('button_text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-button' => 'color: {{VALUE}};']]); $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography', 'label' => __('Typography', 'elementor'), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .elementor-button']); $this->add_control('background_color', ['label' => __('Background Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_4], 'selectors' => ['{{WRAPPER}} .elementor-button' => 'background-color: {{VALUE}};']]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'border', 'label' => __('Border', 'elementor'), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .elementor-button']); $this->add_control('border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_control('text_padding', ['label' => __('Text Padding', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => ['{{WRAPPER}} .elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->end_controls_section(); $this->start_controls_section('section_hover', ['label' => __('Button Hover', 'elementor'), 'type' => Controls_Manager::SECTION, 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('hover_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-button:hover' => 'color: {{VALUE}};']]); $this->add_control('button_background_hover_color', ['label' => __('Background Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-button:hover' => 'background-color: {{VALUE}};']]); $this->add_control('button_hover_border_color', ['label' => __('Border Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'condition' => ['border_border!' => ''], 'selectors' => ['{{WRAPPER}} .elementor-button:hover' => 'border-color: {{VALUE}};']]); $this->add_control('hover_animation', ['label' => __('Animation', 'elementor'), 'type' => Controls_Manager::HOVER_ANIMATION]); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_testimonial', ['label' => __('Testimonial', 'elementor')]); $this->add_control('testimonial_content', ['label' => __('Content', 'elementor'), 'type' => Controls_Manager::TEXTAREA, 'rows' => '10', 'default' => 'Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.']); $this->add_control('testimonial_image', ['label' => __('Add Image', 'elementor'), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src()]]); $this->add_control('testimonial_name', ['label' => __('Name', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => 'John Doe']); $this->add_control('testimonial_job', ['label' => __('Job', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => 'Designer']); $this->add_control('testimonial_image_position', ['label' => __('Image Position', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'aside', 'options' => ['aside' => __('Aside', 'elementor'), 'top' => __('Top', 'elementor')], 'condition' => ['testimonial_image[url]!' => ''], 'separator' => 'before']); $this->add_control('testimonial_alignment', ['label' => __('Alignment', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'default' => 'center', 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']]]); $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']); $this->end_controls_section(); // Content $this->start_controls_section('section_style_testimonial_content', ['label' => __('Content', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('content_content_color', ['label' => __('Content Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3], 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-testimonial-content' => 'color: {{VALUE}};']]); $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'content_typography', 'label' => __('Typography', 'elementor'), 'scheme' => Scheme_Typography::TYPOGRAPHY_3, 'selector' => '{{WRAPPER}} .elementor-testimonial-content']); $this->end_controls_section(); // Image $this->start_controls_section('section_style_testimonial_image', ['label' => __('Image', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => ['testimonial_image[url]!' => '']]); $this->add_control('image_size', ['label' => __('Image Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => ['px' => ['min' => 20, 'max' => 200]], 'selectors' => ['{{WRAPPER}} .elementor-testimonial-wrapper .elementor-testimonial-image img' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};'], 'condition' => ['testimonial_image[url]!' => '']]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'image_border', 'selector' => '{{WRAPPER}} .elementor-testimonial-wrapper .elementor-testimonial-image img', 'condition' => ['testimonial_image[url]!' => '']]); $this->add_control('image_border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-testimonial-wrapper .elementor-testimonial-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'], 'condition' => ['testimonial_image[url]!' => '']]); $this->end_controls_section(); // Name $this->start_controls_section('section_style_testimonial_name', ['label' => __('Name', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('name_text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1], 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-testimonial-name' => 'color: {{VALUE}};']]); $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'name_typography', 'label' => __('Typography', 'elementor'), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .elementor-testimonial-name']); $this->end_controls_section(); // Job $this->start_controls_section('section_style_testimonial_job', ['label' => __('Job', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('job_text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2], 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-testimonial-job' => 'color: {{VALUE}};']]); $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'job_typography', 'label' => __('Typography', 'elementor'), 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '{{WRAPPER}} .elementor-testimonial-job']); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_image', ['label' => __('Image', 'elementor')]); $this->add_control('image', ['label' => __('Choose Image', 'elementor'), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src()]]); $this->add_group_control(Group_Control_Image_Size::get_type(), ['name' => 'image', 'label' => __('Image Size', 'elementor'), 'default' => 'large']); $this->add_responsive_control('align', ['label' => __('Alignment', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']], 'default' => 'center', 'selectors' => ['{{WRAPPER}}' => 'text-align: {{VALUE}};']]); $this->add_control('caption', ['label' => __('Caption', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => '', 'placeholder' => __('Enter your caption about the image', 'elementor'), 'title' => __('Input image caption here', 'elementor')]); $this->add_control('link_to', ['label' => __('Link to', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => ['none' => __('None', 'elementor'), 'file' => __('Media File', 'elementor'), 'custom' => __('Custom URL', 'elementor')]]); $this->add_control('link', ['label' => __('Link to', 'elementor'), 'type' => Controls_Manager::URL, 'placeholder' => __('http://your-link.com', 'elementor'), 'condition' => ['link_to' => 'custom'], 'show_label' => false]); $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']); $this->end_controls_section(); $this->start_controls_section('section_style_image', ['label' => __('Image', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('space', ['label' => __('Size (%)', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 100, 'unit' => '%'], 'size_units' => ['%'], 'range' => ['%' => ['min' => 1, 'max' => 100]], 'selectors' => ['{{WRAPPER}} .elementor-image img' => 'max-width: {{SIZE}}{{UNIT}};']]); $this->add_control('opacity', ['label' => __('Opacity (%)', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 1], 'range' => ['px' => ['max' => 1, 'min' => 0.1, 'step' => 0.01]], 'selectors' => ['{{WRAPPER}} .elementor-image img' => 'opacity: {{SIZE}};']]); $this->add_control('hover_animation', ['label' => __('Hover Animation', 'elementor'), 'type' => Controls_Manager::HOVER_ANIMATION]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'image_border', 'label' => __('Image Border', 'elementor'), 'selector' => '{{WRAPPER}} .elementor-image img']); $this->add_control('image_border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_group_control(Group_Control_Box_Shadow::get_type(), ['name' => 'image_box_shadow', 'selector' => '{{WRAPPER}} .elementor-image img']); $this->end_controls_section(); $this->start_controls_section('section_style_caption', ['label' => __('Caption', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('caption_align', ['label' => __('Alignment', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right'], 'justify' => ['title' => __('Justified', 'elementor'), 'icon' => 'align-justify']], 'default' => '', 'selectors' => ['{{WRAPPER}} .widget-image-caption' => 'text-align: {{VALUE}};']]); $this->add_control('text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .widget-image-caption' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3]]); $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'caption_typography', 'selector' => '{{WRAPPER}} .widget-image-caption', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_gallery', ['label' => __('Image Gallery', 'elementor')]); $this->add_control('wp_gallery', ['label' => __('Add Images', 'elementor'), 'type' => Controls_Manager::GALLERY]); $this->add_group_control(Group_Control_Image_Size::get_type(), ['name' => 'thumbnail', 'exclude' => ['custom']]); $gallery_columns = range(1, 10); $gallery_columns = array_combine($gallery_columns, $gallery_columns); $this->add_control('gallery_columns', ['label' => __('Columns', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 4, 'options' => $gallery_columns]); $this->add_control('gallery_link', ['label' => __('Link to', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'file', 'options' => ['file' => __('Media File', 'elementor'), 'attachment' => __('Attachment Page', 'elementor'), 'none' => __('None', 'elementor')]]); $this->add_control('gallery_rand', ['label' => __('Ordering', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['' => __('Default', 'elementor'), 'rand' => __('Random', 'elementor')], 'default' => '']); $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']); $this->end_controls_section(); $this->start_controls_section('section_gallery_images', ['label' => __('Images', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('image_spacing', ['label' => __('Spacing', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['' => __('Default', 'elementor'), 'custom' => __('Custom', 'elementor')], 'prefix_class' => 'gallery-spacing-', 'default' => '']); $columns_margin = is_rtl() ? '0 0 -{{SIZE}}{{UNIT}} -{{SIZE}}{{UNIT}};' : '0 -{{SIZE}}{{UNIT}} -{{SIZE}}{{UNIT}} 0;'; $columns_padding = is_rtl() ? '0 0 {{SIZE}}{{UNIT}} {{SIZE}}{{UNIT}};' : '0 {{SIZE}}{{UNIT}} {{SIZE}}{{UNIT}} 0;'; $this->add_control('image_spacing_custom', ['label' => __('Image Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'show_label' => false, 'range' => ['px' => ['max' => 100]], 'default' => ['size' => 15], 'selectors' => ['{{WRAPPER}} .gallery-item' => 'padding:' . $columns_padding, '{{WRAPPER}} .gallery' => 'margin: ' . $columns_margin], 'condition' => ['image_spacing' => 'custom']]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'image_border', 'label' => __('Image Border', 'elementor'), 'selector' => '{{WRAPPER}} .gallery-item img']); $this->add_control('image_border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .gallery-item img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->end_controls_section(); $this->start_controls_section('section_caption', ['label' => __('Caption', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('gallery_display_caption', ['label' => __('Display', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => ['' => __('Show', 'elementor'), 'none' => __('Hide', 'elementor')], 'selectors' => ['{{WRAPPER}} .gallery-item .gallery-caption' => 'display: {{VALUE}};']]); $this->add_control('align', ['label' => __('Alignment', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right'], 'justify' => ['title' => __('Justified', 'elementor'), 'icon' => 'align-justify']], 'default' => 'center', 'selectors' => ['{{WRAPPER}} .gallery-item .gallery-caption' => 'text-align: {{VALUE}};'], 'condition' => ['gallery_display_caption' => '']]); $this->add_control('text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .gallery-item .gallery-caption' => 'color: {{VALUE}};'], 'condition' => ['gallery_display_caption' => '']]); $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography', 'label' => __('Typography', 'elementor'), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .gallery-item .gallery-caption', 'condition' => ['gallery_display_caption' => '']]); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_social_icon', ['label' => __('Social Icons', 'elementor')]); $this->add_control('social_icon_list', ['label' => __('Social Icons', 'elementor'), 'type' => Controls_Manager::REPEATER, 'default' => [['social' => 'fa fa-facebook'], ['social' => 'fa fa-twitter'], ['social' => 'fa fa-google-plus']], 'fields' => [['name' => 'social', 'label' => __('Icon', 'elementor'), 'type' => Controls_Manager::ICON, 'label_block' => true, 'default' => 'fa fa-wordpress', 'include' => ['fa fa-behance', 'fa fa-bitbucket', 'fa fa-codepen', 'fa fa-delicious', 'fa fa-digg', 'fa fa-dribbble', 'fa fa-facebook', 'fa fa-flickr', 'fa fa-foursquare', 'fa fa-github', 'fa fa-google-plus', 'fa fa-instagram', 'fa fa-jsfiddle', 'fa fa-linkedin', 'fa fa-medium', 'fa fa-pinterest', 'fa fa-product-hunt', 'fa fa-reddit', 'fa fa-snapchat', 'fa fa-soundcloud', 'fa fa-stack-overflow', 'fa fa-tumblr', 'fa fa-twitch', 'fa fa-twitter', 'fa fa-vimeo', 'fa fa-wordpress', 'fa fa-youtube']], ['name' => 'link', 'label' => __('Link', 'elementor'), 'type' => Controls_Manager::URL, 'label_block' => true, 'default' => ['url' => '', 'is_external' => 'true'], 'placeholder' => __('http://your-link.com', 'elementor')]], 'title_field' => '<i class="{{ social }}"></i> {{{ social.replace( \'fa fa-\', \'\' ).replace( \'-\', \' \' ).replace( /\\b\\w/g, function( letter ){ return letter.toUpperCase() } ) }}}']); $this->add_control('shape', ['label' => __('Shape', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'rounded', 'options' => ['rounded' => __('Rounded', 'elementor'), 'square' => __('Square', 'elementor'), 'circle' => __('Circle', 'elementor')], 'prefix_class' => 'elementor-shape-']); $this->add_responsive_control('align', ['label' => __('Alignment', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']], 'default' => 'center', 'selectors' => ['{{WRAPPER}}' => 'text-align: {{VALUE}};']]); $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']); $this->end_controls_section(); $this->start_controls_section('section_social_style', ['label' => __('Icon', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('icon_color', ['label' => __('Icon Color', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => ['default' => __('Official Color', 'elementor'), 'custom' => __('Custom', 'elementor')]]); $this->add_control('icon_primary_color', ['label' => __('Primary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'condition' => ['icon_color' => 'custom'], 'selectors' => ['{{WRAPPER}} .elementor-social-icon' => 'background-color: {{VALUE}};']]); $this->add_control('icon_secondary_color', ['label' => __('Secondary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'condition' => ['icon_color' => 'custom'], 'selectors' => ['{{WRAPPER}} .elementor-social-icon' => 'color: {{VALUE}};']]); $this->add_control('icon_size', ['label' => __('Icon Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 6, 'max' => 300]], 'selectors' => ['{{WRAPPER}} .elementor-social-icon' => 'font-size: {{SIZE}}{{UNIT}};']]); $this->add_control('icon_padding', ['label' => __('Icon Padding', 'elementor'), 'type' => Controls_Manager::SLIDER, 'selectors' => ['{{WRAPPER}} .elementor-social-icon' => 'padding: {{SIZE}}{{UNIT}};'], 'default' => ['unit' => 'em'], 'range' => ['em' => ['min' => 0, 'max' => 5]]]); $icon_spacing = is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};'; $this->add_control('icon_spacing', ['label' => __('Icon Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 0, 'max' => 100]], 'selectors' => ['{{WRAPPER}} .elementor-social-icon:not(:last-child)' => $icon_spacing]]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'image_border', 'selector' => '{{WRAPPER}} .elementor-social-icon']); $this->add_control('border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_image_carousel', ['label' => __('Image Carousel', 'elementor')]); $this->add_control('carousel', ['label' => __('Add Images', 'elementor'), 'type' => Controls_Manager::GALLERY, 'default' => []]); $this->add_group_control(Group_Control_Image_Size::get_type(), ['name' => 'thumbnail']); $slides_to_show = range(1, 10); $slides_to_show = array_combine($slides_to_show, $slides_to_show); $this->add_control('slides_to_show', ['label' => __('Slides to Show', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '3', 'options' => $slides_to_show]); $this->add_control('slides_to_scroll', ['label' => __('Slides to Scroll', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '2', 'options' => $slides_to_show, 'condition' => ['slides_to_show!' => '1']]); $this->add_control('image_stretch', ['label' => __('Image Stretch', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'no', 'options' => ['no' => __('No', 'elementor'), 'yes' => __('Yes', 'elementor')]]); $this->add_control('navigation', ['label' => __('Navigation', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'both', 'options' => ['both' => __('Arrows and Dots', 'elementor'), 'arrows' => __('Arrows', 'elementor'), 'dots' => __('Dots', 'elementor'), 'none' => __('None', 'elementor')]]); $this->add_control('link_to', ['label' => __('Link to', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => ['none' => __('None', 'elementor'), 'file' => __('Media File', 'elementor'), 'custom' => __('Custom URL', 'elementor')]]); $this->add_control('link', ['label' => 'Link to', 'type' => Controls_Manager::URL, 'placeholder' => __('http://your-link.com', 'elementor'), 'condition' => ['link_to' => 'custom'], 'show_label' => false]); $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']); $this->end_controls_section(); $this->start_controls_section('section_additional_options', ['label' => __('Additional Options', 'elementor')]); $this->add_control('pause_on_hover', ['label' => __('Pause on Hover', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'yes', 'options' => ['yes' => __('Yes', 'elementor'), 'no' => __('No', 'elementor')]]); $this->add_control('autoplay', ['label' => __('Autoplay', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'yes', 'options' => ['yes' => __('Yes', 'elementor'), 'no' => __('No', 'elementor')]]); $this->add_control('autoplay_speed', ['label' => __('Autoplay Speed', 'elementor'), 'type' => Controls_Manager::NUMBER, 'default' => 5000]); $this->add_control('infinite', ['label' => __('Infinite Loop', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'yes', 'options' => ['yes' => __('Yes', 'elementor'), 'no' => __('No', 'elementor')]]); $this->add_control('effect', ['label' => __('Effect', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'slide', 'options' => ['slide' => __('Slide', 'elementor'), 'fade' => __('Fade', 'elementor')], 'condition' => ['slides_to_show' => '1']]); $this->add_control('speed', ['label' => __('Animation Speed', 'elementor'), 'type' => Controls_Manager::NUMBER, 'default' => 500]); $this->add_control('direction', ['label' => __('Direction', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'ltr', 'options' => ['ltr' => __('Left', 'elementor'), 'rtl' => __('Right', 'elementor')]]); $this->end_controls_section(); $this->start_controls_section('section_style_navigation', ['label' => __('Navigation', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => ['navigation' => ['arrows', 'dots', 'both']]]); $this->add_control('heading_style_arrows', ['label' => __('Arrows', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => ['navigation' => ['arrows', 'both']]]); $this->add_control('arrows_position', ['label' => __('Arrows Position', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'inside', 'options' => ['inside' => __('Inside', 'elementor'), 'outside' => __('Outside', 'elementor')], 'condition' => ['navigation' => ['arrows', 'both']]]); $this->add_control('arrows_size', ['label' => __('Arrows Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 20, 'max' => 60]], 'selectors' => ['{{WRAPPER}} .elementor-image-carousel-wrapper .slick-slider .slick-prev:before, {{WRAPPER}} .elementor-image-carousel-wrapper .slick-slider .slick-next:before' => 'font-size: {{SIZE}}{{UNIT}};'], 'condition' => ['navigation' => ['arrows', 'both']]]); $this->add_control('arrows_color', ['label' => __('Arrows Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-image-carousel-wrapper .slick-slider .slick-prev:before, {{WRAPPER}} .elementor-image-carousel-wrapper .slick-slider .slick-next:before' => 'color: {{VALUE}};'], 'condition' => ['navigation' => ['arrows', 'both']]]); $this->add_control('heading_style_dots', ['label' => __('Dots', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => ['navigation' => ['dots', 'both']]]); $this->add_control('dots_position', ['label' => __('Dots Position', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'outside', 'options' => ['outside' => __('Outside', 'elementor'), 'inside' => __('Inside', 'elementor')], 'condition' => ['navigation' => ['dots', 'both']]]); $this->add_control('dots_size', ['label' => __('Dots Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 5, 'max' => 10]], 'selectors' => ['{{WRAPPER}} .elementor-image-carousel-wrapper .elementor-image-carousel .slick-dots li button:before' => 'font-size: {{SIZE}}{{UNIT}};'], 'condition' => ['navigation' => ['dots', 'both']]]); $this->add_control('dots_color', ['label' => __('Dots Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-image-carousel-wrapper .elementor-image-carousel .slick-dots li button:before' => 'color: {{VALUE}};'], 'condition' => ['navigation' => ['dots', 'both']]]); $this->end_controls_section(); $this->start_controls_section('section_style_image', ['label' => __('Image', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('image_spacing', ['label' => __('Spacing', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['' => __('Default', 'elementor'), 'custom' => __('Custom', 'elementor')], 'default' => '', 'condition' => ['slides_to_show!' => '1']]); $this->add_control('image_spacing_custom', ['label' => __('Image Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['max' => 100]], 'default' => ['size' => 20], 'show_label' => false, 'selectors' => ['{{WRAPPER}} .slick-list' => 'margin-left: -{{SIZE}}{{UNIT}};', '{{WRAPPER}} .slick-slide .slick-slide-inner' => 'padding-left: {{SIZE}}{{UNIT}};'], 'condition' => ['image_spacing' => 'custom', 'slides_to_show!' => '1']]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'image_border', 'selector' => '{{WRAPPER}} .elementor-image-carousel-wrapper .elementor-image-carousel .slick-slide-image']); $this->add_control('image_border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-image-carousel-wrapper .elementor-image-carousel .slick-slide-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('_section_style', ['label' => __('Element Style', 'elementor'), 'tab' => Controls_Manager::TAB_ADVANCED]); $this->add_responsive_control('_margin', ['label' => __('Margin', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-widget-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_responsive_control('_padding', ['label' => __('Padding', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => ['{{WRAPPER}} .elementor-widget-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_control('_animation', ['label' => __('Entrance Animation', 'elementor'), 'type' => Controls_Manager::ANIMATION, 'default' => '', 'prefix_class' => 'animated ', 'label_block' => true]); $this->add_control('animation_duration', ['label' => __('Animation Duration', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => ['slow' => __('Slow', 'elementor'), '' => __('Normal', 'elementor'), 'fast' => __('Fast', 'elementor')], 'prefix_class' => 'animated-', 'condition' => ['_animation!' => '']]); $this->add_control('_css_classes', ['label' => __('CSS Classes', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => '', 'prefix_class' => '', 'label_block' => true, 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class', 'elementor')]); $this->end_controls_section(); $this->start_controls_section('_section_background', ['label' => __('Background & Border', 'elementor'), 'tab' => Controls_Manager::TAB_ADVANCED]); $this->add_group_control(Group_Control_Background::get_type(), ['name' => '_background', 'selector' => '{{WRAPPER}} .elementor-widget-container']); $this->add_group_control(Group_Control_Border::get_type(), ['name' => '_border', 'selector' => '{{WRAPPER}} .elementor-widget-container']); $this->add_control('_border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}} .elementor-widget-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_group_control(Group_Control_Box_Shadow::get_type(), ['name' => '_box_shadow', 'selector' => '{{WRAPPER}} .elementor-widget-container']); $this->end_controls_section(); $this->start_controls_section('_section_responsive', ['label' => __('Responsive', 'elementor'), 'tab' => Controls_Manager::TAB_ADVANCED]); $this->add_control('responsive_description', ['raw' => __('Attention: The display settings (show/hide for mobile, tablet or desktop) will only take effect once you are on the preview or live page, and not while you\'re in editing mode in Elementor.', 'elementor'), 'type' => Controls_Manager::RAW_HTML, 'classes' => 'elementor-descriptor']); $this->add_control('hide_desktop', ['label' => __('Hide On Desktop', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => 'Hide', 'label_off' => 'Show', 'return_value' => 'hidden-desktop']); $this->add_control('hide_tablet', ['label' => __('Hide On Tablet', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => 'Hide', 'label_off' => 'Show', 'return_value' => 'hidden-tablet']); $this->add_control('hide_mobile', ['label' => __('Hide On Mobile', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => 'Hide', 'label_off' => 'Show', 'return_value' => 'hidden-phone']); $this->end_controls_section(); }
protected function _register_controls() { $this->start_controls_section('section_layout', ['label' => __('Layout', 'elementor'), 'tab' => Controls_Manager::TAB_LAYOUT]); $this->add_control('stretch_section', ['label' => __('Stretch Section', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'label_on' => __('Yes', 'elementor'), 'label_off' => __('No', 'elementor'), 'return_value' => 'section-stretched', 'prefix_class' => 'elementor-', 'force_render' => true, 'hide_in_inner' => true, 'description' => __('Stretch the section to the full width of the page using JS.', 'elementor') . sprintf(' <a href="%s" target="_blank">%s</a>', 'https://go.elementor.com/stretch-section/', __('Learn more.', 'elementor'))]); $this->add_control('layout', ['label' => __('Content Width', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'boxed', 'options' => ['boxed' => __('Boxed', 'elementor'), 'full_width' => __('Full Width', 'elementor')], 'prefix_class' => 'elementor-section-']); $this->add_control('content_width', ['label' => __('Content Width', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 500, 'max' => 1600]], 'selectors' => ['{{WRAPPER}} > .elementor-container' => 'max-width: {{SIZE}}{{UNIT}};'], 'condition' => ['layout' => ['boxed']], 'show_label' => false, 'separator' => 'none']); $this->add_control('gap', ['label' => __('Columns Gap', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => ['default' => __('Default', 'elementor'), 'no' => __('No Gap', 'elementor'), 'narrow' => __('Narrow', 'elementor'), 'extended' => __('Extended', 'elementor'), 'wide' => __('Wide', 'elementor'), 'wider' => __('Wider', 'elementor')]]); $this->add_control('height', ['label' => __('Height', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => ['default' => __('Default', 'elementor'), 'full' => __('Fit To Screen', 'elementor'), 'min-height' => __('Min Height', 'elementor')], 'prefix_class' => 'elementor-section-height-', 'hide_in_inner' => true]); $this->add_control('custom_height', ['label' => __('Minimum Height', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 400], 'range' => ['px' => ['min' => 0, 'max' => 1440]], 'selectors' => ['{{WRAPPER}} > .elementor-container' => 'min-height: {{SIZE}}{{UNIT}};'], 'condition' => ['height' => ['min-height']], 'hide_in_inner' => true]); $this->add_control('height_inner', ['label' => __('Height', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => ['default' => __('Default', 'elementor'), 'min-height' => __('Min Height', 'elementor')], 'prefix_class' => 'elementor-section-height-', 'hide_in_top' => true]); $this->add_control('custom_height_inner', ['label' => __('Minimum Height', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 400], 'range' => ['px' => ['min' => 0, 'max' => 1440]], 'selectors' => ['{{WRAPPER}} > .elementor-container' => 'min-height: {{SIZE}}{{UNIT}};'], 'condition' => ['height_inner' => ['min-height']], 'hide_in_top' => true]); $this->add_control('column_position', ['label' => __('Column Position', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'middle', 'options' => ['stretch' => __('Stretch', 'elementor'), 'top' => __('Top', 'elementor'), 'middle' => __('Middle', 'elementor'), 'bottom' => __('Bottom', 'elementor')], 'prefix_class' => 'elementor-section-items-', 'condition' => ['height' => ['full', 'min-height']]]); $this->add_control('content_position', ['label' => __('Content Position', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => ['' => __('Default', 'elementor'), 'top' => __('Top', 'elementor'), 'middle' => __('Middle', 'elementor'), 'bottom' => __('Bottom', 'elementor')], 'prefix_class' => 'elementor-section-content-']); $this->add_control('structure', ['label' => __('Structure', 'elementor'), 'type' => Controls_Manager::STRUCTURE, 'default' => '10']); $this->end_controls_section(); // Section background $this->start_controls_section('section_background', ['label' => __('Background', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_group_control(Group_Control_Background::get_type(), ['name' => 'background', 'types' => ['classic', 'video']]); $this->end_controls_section(); // Background Overlay $this->start_controls_section('background_overlay_section', ['label' => __('Background Overlay', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => ['background_background' => ['classic', 'video']]]); $this->add_group_control(Group_Control_Background::get_type(), ['name' => 'background_overlay', 'selector' => '{{WRAPPER}} > .elementor-background-overlay', 'condition' => ['background_background' => ['classic', 'video']]]); $this->add_control('background_overlay_opacity', ['label' => __('Opacity (%)', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 0.5], 'range' => ['px' => ['max' => 1, 'step' => 0.01]], 'selectors' => ['{{WRAPPER}} > .elementor-background-overlay' => 'opacity: {{SIZE}};'], 'condition' => ['background_overlay_background' => ['classic']]]); $this->end_controls_section(); // Section border $this->start_controls_section('section_border', ['label' => __('Border', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_group_control(Group_Control_Border::get_type(), ['name' => 'border']); $this->add_control('border_radius', ['label' => __('Border Radius', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => ['{{WRAPPER}}, {{WRAPPER}} > .elementor-background-overlay' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_group_control(Group_Control_Box_Shadow::get_type(), ['name' => 'box_shadow']); $this->end_controls_section(); // Section Typography $this->start_controls_section('section_typo', ['label' => __('Typography', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]); $this->add_control('heading_color', ['label' => __('Heading Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} > .elementor-container .elementor-heading-title' => 'color: {{VALUE}};']]); $this->add_control('color_text', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} > .elementor-container' => 'color: {{VALUE}};']]); $this->add_control('color_link', ['label' => __('Link Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} > .elementor-container a' => 'color: {{VALUE}};']]); $this->add_control('color_link_hover', ['label' => __('Link Hover Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} > .elementor-container a:hover' => 'color: {{VALUE}};']]); $this->add_control('text_align', ['label' => __('Text Align', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'center' => ['title' => __('Center', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']], 'selectors' => ['{{WRAPPER}} > .elementor-container' => 'text-align: {{VALUE}};']]); $this->end_controls_section(); // Section Advanced $this->start_controls_section('section_advanced', ['label' => __('Advanced', 'elementor'), 'tab' => Controls_Manager::TAB_ADVANCED]); $this->add_responsive_control('margin', ['label' => __('Margin', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'allowed_dimensions' => 'vertical', 'placeholder' => ['top' => '', 'right' => 'auto', 'bottom' => '', 'left' => 'auto'], 'selectors' => ['{{WRAPPER}}' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};']]); $this->add_responsive_control('padding', ['label' => __('Padding', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => ['{{WRAPPER}}' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};']]); $this->add_control('animation', ['label' => __('Entrance Animation', 'elementor'), 'type' => Controls_Manager::ANIMATION, 'default' => '', 'prefix_class' => 'animated ', 'label_block' => true]); $this->add_control('animation_duration', ['label' => __('Animation Duration', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => ['slow' => __('Slow', 'elementor'), '' => __('Normal', 'elementor'), 'fast' => __('Fast', 'elementor')], 'prefix_class' => 'animated-', 'condition' => ['animation!' => '']]); $this->add_control('css_classes', ['label' => __('CSS Classes', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => '', 'prefix_class' => '', 'label_block' => true, 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class', 'elementor')]); $this->end_controls_section(); // Section Responsive $this->start_controls_section('_section_responsive', ['label' => __('Responsive', 'elementor'), 'tab' => Controls_Manager::TAB_ADVANCED]); $this->add_control('reverse_order_mobile', ['label' => __('Reverse Columns', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => __('Yes', 'elementor'), 'label_off' => __('No', 'elementor'), 'return_value' => 'reverse-mobile', 'description' => __('Reverse column order - When on mobile, the column order is reversed, so the last column appears on top and vice versa.', 'elementor')]); $this->add_control('heading_visibility', ['label' => __('Visibility', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before']); $this->add_control('responsive_description', ['raw' => __('Attention: The display settings (show/hide for mobile, tablet or desktop) will only take effect once you are on the preview or live page, and not while you\'re in editing mode in Elementor.', 'elementor'), 'type' => Controls_Manager::RAW_HTML, 'classes' => 'elementor-descriptor']); $this->add_control('hide_desktop', ['label' => __('Hide On Desktop', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => __('Hide', 'elementor'), 'label_off' => __('Show', 'elementor'), 'return_value' => 'hidden-desktop']); $this->add_control('hide_tablet', ['label' => __('Hide On Tablet', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => __('Hide', 'elementor'), 'label_off' => __('Show', 'elementor'), 'return_value' => 'hidden-tablet']); $this->add_control('hide_mobile', ['label' => __('Hide On Mobile', 'elementor'), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'prefix_class' => 'elementor-', 'label_on' => __('Hide', 'elementor'), 'label_off' => __('Show', 'elementor'), 'return_value' => 'hidden-phone']); $this->end_controls_section(); }