protected function _content_template()
{
?>
<# if ( '' !== settings.image.url ) {
elementor.imagesManager.registerItem( elementModel );
// Get url from imagesManager.
var image_url = elementor.imagesManager.getItem( elementModel );
// If it's not in cache, like a new dropped widget or a custom size - get from settings
if ( ! image_url ) {
if ( 'custom' === settings.image_size ) {
return;
}
// If it's a new dropped widget
image_url = settings.image.url;
}
var link_url;
if ( 'custom' === settings.link_to ) {
link_url = settings.link.url;
}
if ( 'file' === settings.link_to ) {
link_url = settings.image.url;
}
#><div class="elementor-image{{ settings.shape ? ' elementor-image-shape-' + settings.shape : '' }}"><#
var imgClass = '',
hasCaption = '' !== settings.caption;
if ( '' !== settings.hover_animation ) {
imgClass = 'elementor-animation-' + settings.hover_animation;
}
if ( hasCaption ) {
#><figure class="wp-caption"><#
}
if ( link_url ) {
#><a href="{{ link_url }}"><#
}
#><img src="{{ image_url }}" class="{{ imgClass }}" /><#
if ( link_url ) {
#></a><#
}
if ( hasCaption ) {
#><figcaption class="widget-image-caption wp-caption-text">{{{ settings.caption }}}</figcaption><#
}
if ( hasCaption ) {
#></figure><#
}
#></div><#
} #>
<?php
}