<?php

$image_url = $content;
$html = "";

if ($action == "fancybox") {
    $html.='<a title="' . $link_title . '" class="picture-icon single-image" href="' . $image_url . '" rel="' . $fancybox_group . '">';
}

if ($action == "link") {
    $html.='<a title="' . $link_title . '" class="single-image" href="' . $image_action_link . '" target="' . $target . '">';
}

if ($show_border) {
    $html.='<div style="float: ' . $align . '; margin:' . (int) $margin_top . 'px ' . (int) $margin_right . 'px ' . (int) $margin_bottom . 'px ' . (int) $margin_left . 'px;" class="bordered"><figure class="add-border">';
}

$src = ThemeMakersHelper::resize_image($image_url, $size);

$html.= '<img alt="' . $image_alt . '"  style="float: ' . $align . ' ; margin:' . (int) $margin_top . 'px ' . (int) $margin_right . 'px ' . (int) $margin_bottom . 'px ' . (int) $margin_left . 'px;" src="' . $src . '" />';

if ($action) {
    $html.='</a>';
}

if ($show_border) {
    $html.= '</figure></div>';
}

echo $html;


