Elementor\Widget_Button::_register_controls PHP Метод

_register_controls() защищенный Метод

protected _register_controls ( )
    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();
    }