<?php

function gfxbucket_clients_func( $atts, $content ) {
	return '<ul class="clients">' . do_shortcode($content) . '</ul>';
}
add_shortcode( 'clients', 'gfxbucket_clients_func' );

function gfxbucket_client_func( $atts, $content ) {
	extract(shortcode_atts( array(
		'image'      => '',
        'url' 	     => '#',
        'new_window' => 'false',
        'title'      => ''
	), $atts ));

	// If set, wrap target attribute with HTML target attribute
	$target = '';
	if( $new_window == 'true' || $new_window == 'yes' ) {
		$target = ' target="_blank"';
	}

	// Return client shortcode
	return '<li><a href="' . $url . '"' . $target . '><img src="' . $image . '" alt="' . $title . '"></a></li>';
}
add_shortcode( 'client', 'gfxbucket_client_func' );