<?php
	$items = '';

	$no_image = 'yes';

	foreach($instance['counter_item'] as $item) {
		$image = wp_get_attachment_image_src($item['image'], 'full');

		if( $image || $item['icon'] ) {
			$no_image = 'no';
		}

		$items .= '[counter_item image="' . $image[0] . '" icon="' . $item['icon'] . '" title="' . $item['title'] . '" number="' . $item['number'] . '"]';
	}
	
	echo do_shortcode('[counter no_image="' . $no_image . '" animate="' . $instance['animate'] . '"]' . $items . '[/counter]');
?>