<?php
/**
 * The default template for displaying inline posts
 */

?>
<article id="post-<?php the_ID(); ?>">
	<?php 
/*

				if ( !empty( $params['photo'] ) AND has_post_thumbnail() ) {

					echo '<a href="'.get_the_permalink().'" class="ltx-photo ltx-photo-left">';
		   			the_post_thumbnail('fitmeal-tiny');
		   			echo '</a>';
		   		}

		   		echo '<div class="descr-right">';

					if ( function_exists('fitmeal_get_the_cats_archive') ) {

						fitmeal_get_the_cats_archive();
					}

					echo '<a href="'.get_the_permalink().'">';
						echo '<h6>'.get_the_title().'</h6>';
					echo '</a>';

					if ( function_exists('fitmeal_the_blog_date') ) {

						fitmeal_get_the_post_headline();
					}

			    echo '</div>';
*/
		if ( has_post_thumbnail() ) {

			$fitmeal_photo_class = 'photo';
        	$fitmeal_layout = get_query_var( 'fitmeal_layout' );

			$fitmeal_image_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_The_ID()), 'full' );

			if ($fitmeal_image_src[2] > $fitmeal_image_src[1]) $fitmeal_photo_class .= ' vertical';
			
		    echo '<a href="'.esc_url(get_the_permalink()).'" class="'.esc_attr($fitmeal_photo_class).'">';

	    		the_post_thumbnail();

		    echo '</a>';
		}
	?>
    <div class="description">
   		<?php

   			fitmeal_get_the_cats_archive();
   			
   		?>
        <a href="<?php esc_url( the_permalink() ); ?>" class="header"><h3><?php the_title(); ?></h3></a>
        <?php if ( !has_post_thumbnail() ): ?>
        <div class="text text-page">
			<?php
				add_filter( 'the_content', 'fitmeal_excerpt' );
			    if( strpos( $post->post_content, '<!--more-->' ) ) {

			        the_content( esc_html__( 'Read more', 'fitmeal' ) );
			    }
			    	else  {

			    	the_excerpt();
			    }	

			?>
        </div>            
    	<?php endif; ?>
    	<div class="blog-info">
    	<?php
			fitmeal_the_post_info();
    	?>
    	</div>
    </div>  
</article>