Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_image', ['label' => __('Image Box', 'elementor')]);
     $this->add_control('image', ['label' => __('Choose Image', 'elementor'), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src()]]);
     $this->add_control('title_text', ['label' => __('Title & Description', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => __('This is the heading', 'elementor'), 'placeholder' => __('Your Title', 'elementor'), 'label_block' => true]);
     $this->add_control('description_text', ['label' => __('Content', 'elementor'), 'type' => Controls_Manager::TEXTAREA, '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.', 'elementor'), 'placeholder' => __('Your Description', 'elementor'), 'title' => __('Input image text here', 'elementor'), 'separator' => 'none', 'rows' => 10, 'show_label' => false]);
     $this->add_control('link', ['label' => __('Link to', 'elementor'), 'type' => Controls_Manager::URL, 'placeholder' => __('http://your-link.com', 'elementor'), 'separator' => 'before']);
     $this->add_control('position', ['label' => __('Image Position', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'default' => 'top', 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'top' => ['title' => __('Top', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']], 'prefix_class' => 'elementor-position-', 'toggle' => false]);
     $this->add_control('title_size', ['label' => __('Title HTML Tag', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['h1' => __('H1', 'elementor'), 'h2' => __('H2', 'elementor'), 'h3' => __('H3', 'elementor'), 'h4' => __('H4', 'elementor'), 'h5' => __('H5', 'elementor'), 'h6' => __('H6', 'elementor'), 'div' => __('div', 'elementor'), 'span' => __('span', 'elementor'), 'p' => __('p', 'elementor')], 'default' => 'h3']);
     $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('image_space', ['label' => __('Image Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 15], 'range' => ['px' => ['min' => 0, 'max' => 100]], 'selectors' => ['{{WRAPPER}}.elementor-position-right .elementor-image-box-img' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.elementor-position-left .elementor-image-box-img' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.elementor-position-top .elementor-image-box-img' => 'margin-bottom: {{SIZE}}{{UNIT}};']]);
     $this->add_control('image_size', ['label' => __('Image Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 30, 'unit' => '%'], 'size_units' => ['%'], 'range' => ['%' => ['min' => 5, 'max' => 100]], 'selectors' => ['{{WRAPPER}} .elementor-image-box-wrapper .elementor-image-box-img' => 'width: {{SIZE}}{{UNIT}};']]);
     $this->add_control('image_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-box-wrapper .elementor-image-box-img img' => 'opacity: {{SIZE}};']]);
     $this->add_control('hover_animation', ['label' => __('Animation', 'elementor'), 'type' => Controls_Manager::HOVER_ANIMATION]);
     $this->end_controls_section();
     $this->start_controls_section('section_style_content', ['label' => __('Content', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_responsive_control('text_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']], 'selectors' => ['{{WRAPPER}} .elementor-image-box-wrapper' => 'text-align: {{VALUE}};']]);
     $this->add_control('content_vertical_alignment', ['label' => __('Vertical Alignment', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['top' => __('Top', 'elementor'), 'middle' => __('Middle', 'elementor'), 'bottom' => __('Bottom', 'elementor')], 'default' => 'top', 'prefix_class' => 'elementor-vertical-align-']);
     $this->add_control('heading_title', ['label' => __('Title', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before']);
     $this->add_responsive_control('title_bottom_space', ['label' => __('Title Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 0, 'max' => 100]], 'selectors' => ['{{WRAPPER}} .elementor-image-box-title' => 'margin-bottom: {{SIZE}}{{UNIT}};']]);
     $this->add_control('title_color', ['label' => __('Title Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-image-box-content .elementor-image-box-title' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'title_typography', 'selector' => '{{WRAPPER}} .elementor-image-box-content .elementor-image-box-title', 'scheme' => Scheme_Typography::TYPOGRAPHY_1]);
     $this->add_control('heading_description', ['label' => __('Description', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before']);
     $this->add_control('description_color', ['label' => __('Description Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-image-box-content .elementor-image-box-description' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'description_typography', 'selector' => '{{WRAPPER}} .elementor-image-box-content .elementor-image-box-description', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]);
     $this->end_controls_section();
 }
Exemplo n.º 4
0
 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();
 }
Exemplo n.º 5
0
 protected function _init_system_schemes()
 {
     $schemes = parent::_init_system_schemes();
     $additional_schemes = ['joker' => ['items' => [self::COLOR_5 => '#4b4646', self::COLOR_6 => '#e2e2e2']], 'ocean' => ['items' => [self::COLOR_5 => '#154d80', self::COLOR_6 => '#8c8c8c']], 'royal' => ['items' => [self::COLOR_5 => '#ac8e4d', self::COLOR_6 => '#e2cea1']], 'violet' => ['items' => [self::COLOR_5 => '#9c9ea6', self::COLOR_6 => '#c184d0']], 'sweet' => ['items' => [self::COLOR_5 => '#41aab9', self::COLOR_6 => '#ffc72f']], 'urban' => ['items' => [self::COLOR_5 => '#aa4039', self::COLOR_6 => '#94dbaf']], 'earth' => ['items' => [self::COLOR_5 => '#aa6666', self::COLOR_6 => '#efe5d9']], 'river' => ['items' => [self::COLOR_5 => '#7b8c93', self::COLOR_6 => '#eb6d65']], 'pastel' => ['items' => [self::COLOR_5 => '#f5a46c', self::COLOR_6 => '#6e6f71']]];
     $schemes = array_replace_recursive($schemes, $additional_schemes);
     foreach ($schemes as &$scheme) {
         $scheme['items'] += [self::COLOR_7 => '#000', self::COLOR_8 => '#fff'];
     }
     return $schemes;
 }
Exemplo n.º 6
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_editor', ['label' => __('Text Editor', 'elementor')]);
     $this->add_control('editor', ['label' => '', 'type' => Controls_Manager::WYSIWYG, 'default' => __('I am text block. 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.', 'elementor')]);
     $this->end_controls_section();
     $this->start_controls_section('section_style', ['label' => __('Text Editor', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $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']], 'selectors' => ['{{WRAPPER}} .elementor-text-editor' => 'text-align: {{VALUE}};']]);
     $this->add_control('text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}}' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]);
     $this->end_controls_section();
 }
Exemplo n.º 7
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_divider', ['label' => __('Divider', 'elementor')]);
     $this->add_control('style', ['label' => __('Style', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['solid' => __('Solid', 'elementor'), 'double' => __('Double', 'elementor'), 'dotted' => __('Dotted', 'elementor'), 'dashed' => __('Dashed', 'elementor')], 'default' => 'solid', 'selectors' => ['{{WRAPPER}} .elementor-divider-separator' => 'border-top-style: {{VALUE}};']]);
     $this->add_control('weight', ['label' => __('Weight', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 1], 'range' => ['px' => ['min' => 1, 'max' => 10]], 'selectors' => ['{{WRAPPER}} .elementor-divider-separator' => 'border-top-width: {{SIZE}}{{UNIT}};']]);
     $this->add_control('color', ['label' => __('Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3], 'selectors' => ['{{WRAPPER}} .elementor-divider-separator' => 'border-top-color: {{VALUE}};']]);
     $this->add_control('width', ['label' => __('Width', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 100, 'unit' => '%'], 'selectors' => ['{{WRAPPER}} .elementor-divider-separator' => 'width: {{SIZE}}{{UNIT}};']]);
     $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' => '', 'selectors' => ['{{WRAPPER}} .elementor-divider' => 'text-align: {{VALUE}};']]);
     $this->add_control('gap', ['label' => __('Gap', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 15], 'range' => ['px' => ['min' => 2, 'max' => 50]], 'selectors' => ['{{WRAPPER}} .elementor-divider' => 'padding-top: {{SIZE}}{{UNIT}}; padding-bottom: {{SIZE}}{{UNIT}};']]);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']);
     $this->end_controls_section();
 }
Exemplo n.º 8
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_title', ['label' => __('Title', 'elementor')]);
     $this->add_control('title', ['label' => __('Title', 'elementor'), 'type' => Controls_Manager::TEXTAREA, 'placeholder' => __('Enter your title', 'elementor'), 'default' => __('This is heading element', 'elementor')]);
     $this->add_control('link', ['label' => __('Link', 'elementor'), 'type' => Controls_Manager::URL, 'placeholder' => 'http://your-link.com', 'default' => ['url' => ''], 'separator' => 'before']);
     $this->add_control('size', ['label' => __('Size', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'default', 'options' => ['default' => __('Default', 'elementor'), 'small' => __('Small', 'elementor'), 'medium' => __('Medium', 'elementor'), 'large' => __('Large', 'elementor'), 'xl' => __('XL', 'elementor'), 'xxl' => __('XXL', 'elementor')]]);
     $this->add_control('header_size', ['label' => __('HTML Tag', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['h1' => __('H1', 'elementor'), 'h2' => __('H2', 'elementor'), 'h3' => __('H3', 'elementor'), 'h4' => __('H4', 'elementor'), 'h5' => __('H5', 'elementor'), 'h6' => __('H6', 'elementor'), 'div' => __('div', 'elementor'), 'span' => __('span', 'elementor'), 'p' => __('p', 'elementor')], 'default' => 'h2']);
     $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']], 'default' => '', '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_title_style', ['label' => __('Title', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('title_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1], 'selectors' => ['{{WRAPPER}} .elementor-heading-title' => 'color: {{VALUE}};']]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography', 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .elementor-heading-title']);
     $this->end_controls_section();
 }
Exemplo n.º 9
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_icon', ['label' => __('Icon List', 'elementor')]);
     $this->add_control('icon_list', ['label' => '', 'type' => Controls_Manager::REPEATER, 'default' => [['text' => __('List Item #1', 'elementor'), 'icon' => 'fa fa-check'], ['text' => __('List Item #2', 'elementor'), 'icon' => 'fa fa-times'], ['text' => __('List Item #3', 'elementor'), 'icon' => 'fa fa-dot-circle-o']], 'fields' => [['name' => 'text', 'label' => __('Text', 'elementor'), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' => __('List Item', 'elementor'), 'default' => __('List Item', 'elementor')], ['name' => 'icon', 'label' => __('Icon', 'elementor'), 'type' => Controls_Manager::ICON, 'label_block' => true, 'default' => 'fa fa-check'], ['name' => 'link', 'label' => __('Link', 'elementor'), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __('http://your-link.com', 'elementor')]], 'title_field' => '<i class="{{ icon }}"></i> {{{ text }}}']);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']);
     $this->end_controls_section();
     $this->start_controls_section('section_icon_style', ['label' => __('Icon', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('icon_color', ['label' => __('Icon Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-icon-list-icon i' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1]]);
     $this->add_control('icon_size', ['label' => __('Icon Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 14], 'range' => ['px' => ['min' => 6]], 'selectors' => ['{{WRAPPER}} .elementor-icon-list-icon' => 'font-size: {{SIZE}}{{UNIT}};']]);
     $this->add_responsive_control('icon_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']], 'selectors' => ['{{WRAPPER}} .elementor-icon-list-items' => 'text-align: {{VALUE}};']]);
     $this->end_controls_section();
     $this->start_controls_section('section_text_style', ['label' => __('Text', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('text_indent', ['label' => __('Text Indent', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['max' => 50]], 'selectors' => ['{{WRAPPER}} .elementor-icon-list-text' => is_rtl() ? 'padding-right: {{SIZE}}{{UNIT}};' : 'padding-left: {{SIZE}}{{UNIT}};']]);
     $this->add_control('text_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-icon-list-text' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'icon_typography', 'label' => __('Typography', 'elementor'), 'selector' => '{{WRAPPER}} .elementor-icon-list-text', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]);
     $this->end_controls_section();
 }
Exemplo n.º 10
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_toggle', ['label' => __('Toggle', 'elementor')]);
     $this->add_control('tabs', ['label' => __('Toggle Items', 'elementor'), 'type' => Controls_Manager::REPEATER, 'default' => [['tab_title' => __('Toggle #1', 'elementor'), 'tab_content' => __('I am item content. 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.', 'elementor')], ['tab_title' => __('Toggle #2', 'elementor'), 'tab_content' => __('I am item content. 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.', 'elementor')]], 'fields' => [['name' => 'tab_title', 'label' => __('Title & Content', 'elementor'), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => __('Toggle Title', 'elementor')], ['name' => 'tab_content', 'label' => __('Content', 'elementor'), 'type' => Controls_Manager::WYSIWYG, 'default' => __('Toggle Content', 'elementor'), 'show_label' => false]], 'title_field' => '{{{ tab_title }}}']);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']);
     $this->end_controls_section();
     $this->start_controls_section('section_toggle_style', ['label' => __('Toggle', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('border_width', ['label' => __('Border Width', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 1], 'range' => ['px' => ['min' => 0, 'max' => 10]], 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-title' => 'border-width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .elementor-toggle .elementor-toggle-content' => 'border-width: {{SIZE}}{{UNIT}};']]);
     $this->add_control('border_color', ['label' => __('Border Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-content' => 'border-bottom-color: {{VALUE}};', '{{WRAPPER}} .elementor-toggle .elementor-toggle-title' => 'border-color: {{VALUE}};']]);
     $this->add_control('title_background', ['label' => __('Title Background', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-title' => 'background-color: {{VALUE}};'], 'separator' => 'before']);
     $this->add_control('title_color', ['label' => __('Title Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-title' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1]]);
     $this->add_control('tab_active_color', ['label' => __('Active Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-title.active' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_4]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['label' => __('Title Typography', 'elementor'), 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .elementor-toggle .elementor-toggle-title', 'scheme' => Scheme_Typography::TYPOGRAPHY_1]);
     $this->add_control('content_background_color', ['label' => __('Content Background', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-content' => 'background-color: {{VALUE}};'], 'separator' => 'before']);
     $this->add_control('content_color', ['label' => __('Content Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-toggle .elementor-toggle-content' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'content_typography', 'label' => 'Content Typography', 'selector' => '{{WRAPPER}} .elementor-toggle .elementor-toggle-content', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]);
     $this->end_controls_section();
 }
Exemplo n.º 11
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_progress', ['label' => __('Progress Bar', 'elementor')]);
     $this->add_control('title', ['label' => __('Title', 'elementor'), 'type' => Controls_Manager::TEXT, 'placeholder' => __('Enter your title', 'elementor'), 'default' => __('My Skill', 'elementor'), 'label_block' => true]);
     $this->add_control('progress_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('percent', ['label' => __('Percentage', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 50, 'unit' => '%'], 'label_block' => true]);
     $this->add_control('display_percentage', ['label' => __('Display Percentage', 'elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'show', 'options' => ['show' => __('Show', 'elementor'), 'hide' => __('Hide', 'elementor')]]);
     $this->add_control('inner_text', ['label' => __('Inner Text', 'elementor'), 'type' => Controls_Manager::TEXT, 'placeholder' => __('e.g. Web Designer', 'elementor'), 'default' => __('Web Designer', 'elementor'), 'label_block' => true]);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']);
     $this->end_controls_section();
     $this->start_controls_section('section_progress_style', ['label' => __('Progress Bar', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('bar_color', ['label' => __('Bar Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1], 'selectors' => ['{{WRAPPER}} .elementor-progress-wrapper .elementor-progress-bar' => 'background-color: {{VALUE}};']]);
     $this->add_control('bar_bg_color', ['label' => __('Bar Background Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-progress-wrapper' => 'background-color: {{VALUE}};']]);
     $this->add_control('bar_inline_color', ['label' => __('Inner Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-progress-wrapper .elementor-progress-inner-text' => 'color: {{VALUE}};']]);
     $this->end_controls_section();
     $this->start_controls_section('section_title', ['label' => __('Title Style', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('title_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => ['{{WRAPPER}} .elementor-title' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography', 'selector' => '{{WRAPPER}} .elementor-title', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]);
     $this->end_controls_section();
 }
Exemplo n.º 12
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_counter', ['label' => __('Counter', 'elementor')]);
     $this->add_control('starting_number', ['label' => __('Starting Number', 'elementor'), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'default' => 0]);
     $this->add_control('ending_number', ['label' => __('Ending Number', 'elementor'), 'type' => Controls_Manager::NUMBER, 'min' => 100, 'default' => 100]);
     $this->add_control('prefix', ['label' => __('Number Prefix', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => '', 'placeholder' => 1]);
     $this->add_control('suffix', ['label' => __('Number Suffix', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => '', 'placeholder' => __('Plus', 'elementor')]);
     $this->add_control('duration', ['label' => __('Animation Duration', 'elementor'), 'type' => Controls_Manager::NUMBER, 'default' => 2000, 'min' => 100, 'step' => 100]);
     $this->add_control('title', ['label' => __('Title', 'elementor'), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => __('Cool Number', 'elementor'), 'placeholder' => __('Cool Number', 'elementor')]);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional']);
     $this->end_controls_section();
     $this->start_controls_section('section_number', ['label' => __('Number', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('number_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1], 'selectors' => ['{{WRAPPER}} .elementor-counter-number-wrapper' => 'color: {{VALUE}};']]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography_number', 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .elementor-counter-number-wrapper']);
     $this->end_controls_section();
     $this->start_controls_section('section_title', ['label' => __('Title', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('title_color', ['label' => __('Text Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_2], 'selectors' => ['{{WRAPPER}} .elementor-counter-title' => 'color: {{VALUE}};']]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'typography_title', 'scheme' => Scheme_Typography::TYPOGRAPHY_2, 'selector' => '{{WRAPPER}} .elementor-counter-title']);
     $this->end_controls_section();
 }
Exemplo n.º 13
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_icon', ['label' => __('Icon Box', 'elementor')]);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['default' => __('Default', 'elementor'), 'stacked' => __('Stacked', 'elementor'), 'framed' => __('Framed', 'elementor')], 'default' => 'default', 'prefix_class' => 'elementor-view-']);
     $this->add_control('icon', ['label' => __('Choose Icon', 'elementor'), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-star']);
     $this->add_control('shape', ['label' => __('Shape', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['circle' => __('Circle', 'elementor'), 'square' => __('Square', 'elementor')], 'default' => 'circle', 'condition' => ['view!' => 'default'], 'prefix_class' => 'elementor-shape-']);
     $this->add_control('title_text', ['label' => __('Title & Description', 'elementor'), 'type' => Controls_Manager::TEXT, 'default' => __('This is the heading', 'elementor'), 'placeholder' => __('Your Title', 'elementor'), 'label_block' => true]);
     $this->add_control('description_text', ['label' => '', 'type' => Controls_Manager::TEXTAREA, '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.', 'elementor'), 'placeholder' => __('Your Description', 'elementor'), 'title' => __('Input icon text here', 'elementor'), 'rows' => 10, 'separator' => 'none', 'show_label' => false]);
     $this->add_control('link', ['label' => __('Link to', 'elementor'), 'type' => Controls_Manager::URL, 'placeholder' => __('http://your-link.com', 'elementor'), 'separator' => 'before']);
     $this->add_control('position', ['label' => __('Icon Position', 'elementor'), 'type' => Controls_Manager::CHOOSE, 'default' => 'top', 'options' => ['left' => ['title' => __('Left', 'elementor'), 'icon' => 'align-left'], 'top' => ['title' => __('Top', 'elementor'), 'icon' => 'align-center'], 'right' => ['title' => __('Right', 'elementor'), 'icon' => 'align-right']], 'prefix_class' => 'elementor-position-', 'toggle' => false]);
     $this->add_control('title_size', ['label' => __('Title HTML Tag', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['h1' => __('H1', 'elementor'), 'h2' => __('H2', 'elementor'), 'h3' => __('H3', 'elementor'), 'h4' => __('H4', 'elementor'), 'h5' => __('H5', 'elementor'), 'h6' => __('H6', 'elementor'), 'div' => __('div', 'elementor'), 'span' => __('span', 'elementor'), 'p' => __('p', 'elementor')], 'default' => 'h3']);
     $this->end_controls_section();
     $this->start_controls_section('section_style_icon', ['label' => __('Icon', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('primary_color', ['label' => __('Primary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1], 'default' => '', 'selectors' => ['{{WRAPPER}}.elementor-view-stacked .elementor-icon' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-framed .elementor-icon, {{WRAPPER}}.elementor-view-default .elementor-icon' => 'color: {{VALUE}}; border-color: {{VALUE}};']]);
     $this->add_control('secondary_color', ['label' => __('Secondary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'condition' => ['view!' => 'default'], 'selectors' => ['{{WRAPPER}}.elementor-view-framed .elementor-icon' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-stacked .elementor-icon' => 'color: {{VALUE}};']]);
     $this->add_control('icon_space', ['label' => __('Icon Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 15], 'range' => ['px' => ['min' => 0, 'max' => 100]], 'selectors' => ['{{WRAPPER}}.elementor-position-right .elementor-icon-box-icon' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.elementor-position-left .elementor-icon-box-icon' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.elementor-position-top .elementor-icon-box-icon' => 'margin-bottom: {{SIZE}}{{UNIT}};']]);
     $this->add_control('icon_size', ['label' => __('Icon Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 6, 'max' => 300]], 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'font-size: {{SIZE}}{{UNIT}};']]);
     $this->add_control('icon_padding', ['label' => __('Icon Padding', 'elementor'), 'type' => Controls_Manager::SLIDER, 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'padding: {{SIZE}}{{UNIT}};'], 'range' => ['em' => ['min' => 0, 'max' => 5]], 'condition' => ['view!' => 'default']]);
     $this->add_control('rotate', ['label' => __('Icon Rotate', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 0, 'unit' => 'deg'], 'selectors' => ['{{WRAPPER}} .elementor-icon i' => 'transform: rotate({{SIZE}}{{UNIT}});']]);
     $this->add_control('border_width', ['label' => __('Border Width', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'], 'condition' => ['view' => 'framed']]);
     $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}};'], 'condition' => ['view!' => 'default']]);
     $this->end_controls_section();
     $this->start_controls_section('section_hover', ['label' => __('Icon Hover', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('hover_primary_color', ['label' => __('Primary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}}.elementor-view-stacked .elementor-icon:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-framed .elementor-icon:hover, {{WRAPPER}}.elementor-view-default .elementor-icon:hover' => 'color: {{VALUE}}; border-color: {{VALUE}};']]);
     $this->add_control('hover_secondary_color', ['label' => __('Secondary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'condition' => ['view!' => 'default'], 'selectors' => ['{{WRAPPER}}.elementor-view-framed .elementor-icon:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-stacked .elementor-icon:hover' => 'color: {{VALUE}};']]);
     $this->add_control('hover_animation', ['label' => __('Animation', 'elementor'), 'type' => Controls_Manager::HOVER_ANIMATION]);
     $this->end_controls_section();
     $this->start_controls_section('section_style_content', ['label' => __('Content', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_responsive_control('text_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']], 'selectors' => ['{{WRAPPER}} .elementor-icon-box-wrapper' => 'text-align: {{VALUE}};']]);
     $this->add_control('content_vertical_alignment', ['label' => __('Vertical Alignment', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['top' => __('Top', 'elementor'), 'middle' => __('Middle', 'elementor'), 'bottom' => __('Bottom', 'elementor')], 'default' => 'top', 'prefix_class' => 'elementor-vertical-align-']);
     $this->add_control('heading_title', ['label' => __('Title', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before']);
     $this->add_responsive_control('title_bottom_space', ['label' => __('Title Spacing', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 0, 'max' => 100]], 'selectors' => ['{{WRAPPER}} .elementor-icon-box-title' => 'margin-bottom: {{SIZE}}{{UNIT}};']]);
     $this->add_control('title_color', ['label' => __('Title Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-icon-box-content .elementor-icon-box-title' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'title_typography', 'selector' => '{{WRAPPER}} .elementor-icon-box-content .elementor-icon-box-title', 'scheme' => Scheme_Typography::TYPOGRAPHY_1]);
     $this->add_control('heading_description', ['label' => __('Description', 'elementor'), 'type' => Controls_Manager::HEADING, 'separator' => 'before']);
     $this->add_control('description_color', ['label' => __('Description Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}} .elementor-icon-box-content .elementor-icon-box-description' => 'color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_3]]);
     $this->add_group_control(Group_Control_Typography::get_type(), ['name' => 'description_typography', 'selector' => '{{WRAPPER}} .elementor-icon-box-content .elementor-icon-box-description', 'scheme' => Scheme_Typography::TYPOGRAPHY_3]);
     $this->end_controls_section();
 }
Exemplo n.º 14
0
 protected function _register_controls()
 {
     $this->start_controls_section('section_icon', ['label' => __('Icon', 'elementor')]);
     $this->add_control('view', ['label' => __('View', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['default' => __('Default', 'elementor'), 'stacked' => __('Stacked', 'elementor'), 'framed' => __('Framed', 'elementor')], 'default' => 'default', 'prefix_class' => 'elementor-view-']);
     $this->add_control('icon', ['label' => __('Icon', 'elementor'), 'type' => Controls_Manager::ICON, 'label_block' => true, 'default' => 'fa fa-star']);
     $this->add_control('shape', ['label' => __('Shape', 'elementor'), 'type' => Controls_Manager::SELECT, 'options' => ['circle' => __('Circle', 'elementor'), 'square' => __('Square', 'elementor')], 'default' => 'circle', 'condition' => ['view!' => 'default'], 'prefix_class' => 'elementor-shape-']);
     $this->add_control('link', ['label' => __('Link', 'elementor'), 'type' => Controls_Manager::URL, 'placeholder' => 'http://your-link.com']);
     $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}} .elementor-icon-wrapper' => 'text-align: {{VALUE}};']]);
     $this->end_controls_section();
     $this->start_controls_section('section_style_icon', ['label' => __('Icon', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('primary_color', ['label' => __('Primary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}}.elementor-view-stacked .elementor-icon' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-framed .elementor-icon, {{WRAPPER}}.elementor-view-default .elementor-icon' => 'color: {{VALUE}}; border-color: {{VALUE}};'], 'scheme' => ['type' => Scheme_Color::get_type(), 'value' => Scheme_Color::COLOR_1]]);
     $this->add_control('secondary_color', ['label' => __('Secondary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'condition' => ['view!' => 'default'], 'selectors' => ['{{WRAPPER}}.elementor-view-framed .elementor-icon' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-stacked .elementor-icon' => 'color: {{VALUE}};']]);
     $this->add_control('size', ['label' => __('Icon Size', 'elementor'), 'type' => Controls_Manager::SLIDER, 'range' => ['px' => ['min' => 6, 'max' => 300]], 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'font-size: {{SIZE}}{{UNIT}};']]);
     $this->add_control('icon_padding', ['label' => __('Icon Padding', 'elementor'), 'type' => Controls_Manager::SLIDER, 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'padding: {{SIZE}}{{UNIT}};'], 'range' => ['em' => ['min' => 0, 'max' => 5]], 'condition' => ['view!' => 'default']]);
     $this->add_control('rotate', ['label' => __('Icon Rotate', 'elementor'), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 0, 'unit' => 'deg'], 'selectors' => ['{{WRAPPER}} .elementor-icon i' => 'transform: rotate({{SIZE}}{{UNIT}});']]);
     $this->add_control('border_width', ['label' => __('Border Width', 'elementor'), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => ['{{WRAPPER}} .elementor-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'], 'condition' => ['view' => 'framed']]);
     $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}};'], 'condition' => ['view!' => 'default']]);
     $this->end_controls_section();
     $this->start_controls_section('section_hover', ['label' => __('Icon Hover', 'elementor'), 'tab' => Controls_Manager::TAB_STYLE]);
     $this->add_control('hover_primary_color', ['label' => __('Primary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => ['{{WRAPPER}}.elementor-view-stacked .elementor-icon:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-framed .elementor-icon:hover, {{WRAPPER}}.elementor-view-default .elementor-icon:hover' => 'color: {{VALUE}}; border-color: {{VALUE}};']]);
     $this->add_control('hover_secondary_color', ['label' => __('Secondary Color', 'elementor'), 'type' => Controls_Manager::COLOR, 'default' => '', 'condition' => ['view!' => 'default'], 'selectors' => ['{{WRAPPER}}.elementor-view-framed .elementor-icon:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}}.elementor-view-stacked .elementor-icon:hover' => 'color: {{VALUE}};']]);
     $this->add_control('hover_animation', ['label' => __('Animation', 'elementor'), 'type' => Controls_Manager::HOVER_ANIMATION]);
     $this->end_controls_section();
 }