<?php



/**
 * Shortcode: Member logo slider
 */
function build_home_slider($atts, $content = null)
{

	ob_start();

	echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">';

	if (have_rows('members_logo', 'option')) :
		while (have_rows('members_logo', 'option')) : the_row();
			$logo_url = get_sub_field('logo');
			$company_link = get_sub_field('link');

			echo '<div class="thumbnail thumbnail-hover">';
			echo '<img class="img-responsive" src=" ' . $logo_url . '">';
			echo '<a href=" ' . $company_link . ' " " title=" ' .  $company_link . ' " class="link-full"></a>';
			echo '</div>';

		endwhile;
	else :
		echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>';
	endif;
	echo '</div></div>';

	$output = ob_get_clean();
	return $output;
}

add_shortcode('home_slider', 'build_home_slider');


/**
 * Shortcode: Member logo slider
 */
function member_logo_slider($atts, $content = null)
{

	ob_start();

	echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">';

	if (have_rows('members_logo', 'option')) :
		while (have_rows('members_logo', 'option')) : the_row();
			$logo_url = get_sub_field('logo');
			$company_link = get_sub_field('link');

			echo '<div class="thumbnail thumbnail-hover">';
			echo '<img class="img-responsive" src=" ' . $logo_url . '">';
			echo '<a href=" ' . $company_link . ' " " title=" ' .  $company_link . ' " class="link-full"></a>';
			echo '</div>';

		endwhile;
	else :
		echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>';
	endif;
	echo '</div></div>';

	$output = ob_get_clean();
	return $output;
}

add_shortcode('members_logo', 'member_logo_slider');
