/home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets
Edit: /home/techb158/public_html/wp-content/themes/engitech/inc/backend/elementor-widgets/image-box.php (4265B)
start_controls_section(
'content_section',
[
'label' => __( 'Image Box', 'engitech' ),
]
);
$this->add_control(
'image_box',
[
'label' => esc_html__( 'Image', 'engitech' ),
'type' => Controls_Manager::MEDIA,
'default' => [
'url' => Utils::get_placeholder_image_src(),
]
]
);
$this->add_control(
'title',
[
'label' => __( 'Title', 'engitech' ),
'type' => Controls_Manager::TEXT,
'default' => __( 'Our Mission', 'engitech' ),
'label_block' => true,
]
);
$this->add_control(
'link',
[
'label' => __( 'Link', 'engitech' ),
'type' => Controls_Manager::URL,
'placeholder' => __( 'https://your-link.com', 'engitech' ),
]
);
$this->end_controls_section();
//Style
$this->start_controls_section(
'style_content_section',
[
'label' => __( 'Content', 'engitech' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
//Title
$this->add_control(
'heading_title',
[
'label' => __( 'Title', 'engitech' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_responsive_control(
'title_space',
[
'label' => __( 'Spacing', 'engitech' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .ot-image-box h4' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'title_color',
[
'label' => __( 'Color', 'engitech' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .ot-image-box h4' => 'color: {{VALUE}};',
]
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'selector' => '{{WRAPPER}} .ot-image-box h4',
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
if ( ! empty( $settings['link']['url'] ) ) {
$this->add_render_attribute( 'imagebox', 'href', $settings['link']['url'] );
if ( $settings['link']['is_external'] ) {
$this->add_render_attribute( 'imagebox', 'target', '_blank' );
}
if ( $settings['link']['nofollow'] ) {
$this->add_render_attribute( 'imagebox', 'rel', 'nofollow' );
}
}
?>
get_render_attribute_string( 'imagebox' ); ?>>
widgets_manager->register_widget_type( new Engitech_ImageBox() );