';
if ( ! empty( $settings['link']['url'] ) ) {
$this->add_link_attributes( 'link', $settings['link'] );
}
if ( ! empty( $settings['image']['url'] ) ) {
$image_html = wp_kses_post( Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'image' ) );
if ( ! empty( $settings['link']['url'] ) ) {
$image_html = '
';
if ( ! Utils::is_empty( $settings['title_text'] ) ) {
$this->add_render_attribute( 'title_text', 'class', 'elementor-image-box-title' );
$this->add_inline_editing_attributes( 'title_text', 'none' );
$title_html = $settings['title_text'];
if ( ! empty( $settings['link']['url'] ) ) {
$title_html = '
get_render_attribute_string( 'link' ) . '>' . $title_html . '';
}
$html .= sprintf( '<%1$s %2$s>%3$s%1$s>', Utils::validate_html_tag( $settings['title_size'] ), $this->get_render_attribute_string( 'title_text' ), $title_html );
}
if ( ! Utils::is_empty( $settings['description_text'] ) ) {
$this->add_render_attribute( 'description_text', 'class', 'elementor-image-box-description' );
$this->add_inline_editing_attributes( 'description_text' );
$html .= sprintf( '
%2$s
', $this->get_render_attribute_string( 'description_text' ), $settings['description_text'] );
}
$html .= '