<?php
	$client_list = '';

	$new_window = '';
	if( !empty($instance['new_window']) ) {
		$new_window = 'true';
	}

	foreach($instance['client'] as $item) {
		$image = $item['image_fallback'];

		if( $item['image'] ) {
			$image = wp_get_attachment_image_src($item['image'], 'full');
			$image = $image[0];
		}

		$client_list .= '[client new_window="' . $new_window . '" title="' . $item['name'] . '" url="' . $item['url'] . '" image="' . $image . '"]';
	}
	
	echo do_shortcode('[clients]' . $client_list . '[/clients]');
?>