<?php

function member_func( $atts, $content ) {
	extract(shortcode_atts( array(
		'text'        => '',
		'url_text'    => '',
		'url'         => '',
		'new_window'  => 'false',
		'image'       => ''
	), $atts ));

	// If set, wrap target attribute with HTML target attribute

	$target = '';
	if( $new_window == 'true' ) {
		$target = ' target="_blank"';
	}

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

	return '<div class="team team-single">
		<div class="member">
			<div class="member-image">
				<img src="' . $image . '" alt="' . $text . '">
			</div>
			<div class="member-description">
				<p>' . $text . '</p>
				<a href="' . $url . '" class="more"' . $target . '>'. $url_text . '</a>
			</div>
		</div>
	</div>';
}
add_shortcode( 'member', 'member_func' );