digisavvy
8/7/2014 - 7:13 PM

gistfile1.php

<?php
add_filter( 'soliloquy_output_slide', 'tgm_soliloquy_custom_html', 10, 4 );
function tgm_soliloquy_custom_html( $html, $id, $image, $data ) {
	// If the ID doesn't match the one we want to modify, return the default HTML output. Change 324 to your slider ID.
	$slider_id = $data['id'];

	ob_start(); ?>

		<span class="social-m">
			<?php $summary = get_field('short_description');?>
			<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php the_title();?>&amp;p[summary]=<?php echo $summary;?>&amp;p[url]=<?php the_permalink();?>&amp;&amp;p[images][0]=<?php echo $image['sizes']['recipe-list'];?>','sharer','toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)"><img class="facebook fade" src="<?php bloginfo('template_directory');?>/images/share-fb.png" width="20" height="20" alt="Share this message on Facebook" /></a>
			<a onclick="window.open(this.href);return false;" href="http://pinterest.com/pin/create/button/?url=<?php the_permalink();?>&media=<?php echo $image['sizes']['recipe-list']; ?>&description=<?php the_field('recipe_description'); ?>" class="pin-it-button" count-layout="none"><img border="0" src="<?php bloginfo('template_directory');?>/images/share-pnt.png" title="Pin It" /></a>
			<a href="http://twitter.com/share?text=<?php the_field('recipe_description'); ?>&url=<?php the_permalink();?>" target="_blank"><img src="<?php bloginfo('template_directory');?>/images/share-tw.png" width="20" height="20" alt="" /></a>
		</span>

	<?php 	
	$html = ob_get_contents();

	ob_end_clean();
 
	if ( '1937' == $slider_id ) {
		// $html .= '<div class="addthis_sharing_toolbox"></div>';
		return $html;
	} else {
		// $html .= '<div><p>Hello World!</p></div>';
		return $html;
	}
	
}