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

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

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