<?php

/**
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */

if (!function_exists('nomad_press_thumbnail_function')) {

	function nomad_press_thumbnail_function($id, $icon = null ) {

		if ( '' != get_the_post_thumbnail() ) { 
		
			global $post;
			
			$class = '';

			if ( 
				 ( is_home() ) ||
				 ( nomad_press_is_archive() ) ||
				 ( is_search() ) 
			) :

				$class = 'blog-section';

			endif;
			
		?>

                <div class="pin-container <?php echo esc_attr($class);?>" >
                                
                    <?php the_post_thumbnail($id); ?>
                                
                </div>

		<?php 


		}
	
	}

	add_action( 'avventura_lite_thumbnail', 'nomad_press_thumbnail_function', 10, 2 );

}

?>