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

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

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