start_controls_section(
'section_content',
[
'label' => __( 'Image', 'addonse' ),
]
);
$this->add_control(
'image',
[
'label' => __( 'Choose Image', 'addonse' ),
'type' => Controls_Manager::MEDIA,
'dynamic' => [
'active' => true,
],
'default' => [
'url' => Utils::get_placeholder_image_src(),
],
]
);
$this->add_control(
'image_mask_heading',
[
'label' => __( 'Mask', 'addonse' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_control(
'image_mask',
[
'label' => __( 'Type', 'addonse' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'style_1',
'options' => [
'style_1' => __( 'Style 1', 'addonse' ),
'style_2' => __( 'Style 2', 'addonse' ),
'style_3' => __( 'Style 3', 'addonse' ),
'style_4' => __( 'Style 4', 'addonse' ),
'style_5' => __( 'Style 5', 'addonse' ),
'style_6' => __( 'Style 6', 'addonse'),
'style_7' => __( 'Style 7', 'addonse'),
'style_8' => __( 'Style 8', 'addonse'),
'none' => __( 'None', 'addonse' ),
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_image_style',
[
'label' => __( 'Image', 'addonse' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'image_padding',
[
'label' => __( 'Padding', 'elementor' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', 'em', '%' ],
'selectors' => [
'{{WRAPPER}} .addonse-imagemask' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'separator' => 'before',
]
);
$this->end_controls_section();
}
/**
* Render social icons widget output on the frontend.
*
* Written in PHP and used to generate the final HTML.
*
* @since 1.0.0
* @access protected
*/
protected function render() {
$settings = $this->get_settings_for_display();
$svg_id = 'addonse-svg-' . $this->get_id();
$image_id = 'addonse-image-' . $this->get_id();
?>