<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
$featured_image_url = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<div class="post-list-content">
		<?php if ( ! empty( $featured_image_url ) && ! empty( $showImage ) && $showImage == 'yes' ) { ?>
			<div class="post-content-image">
				<a href="<?php echo esc_url( get_the_permalink() ); ?>">
					<?php include ECAFE_PATH . 'element/post-data/format-image.php'; ?>
				</a>
				<?php
				if ( ! empty( $showPostMeta ) && $showPostMeta == 'yes' ) {
					include ECAFE_PATH . 'element/post-data/post-category-style-1.php';
				}
				?>
			</div>
		<?php } ?>
		<div class="post-content-data">
			<?php
			if ( ! empty( $showTitle ) && $showTitle == 'yes' ) {
				include ECAFE_PATH . 'element/post-data/post-meta-title.php';
			}
			if ( ! empty( $showExcerpt ) && $showExcerpt == 'yes' && get_the_excerpt() ) {
				include ECAFE_PATH . 'element/post-data/get-excerpt.php';
			}
			if ( ! empty( $showPostMeta ) && $showPostMeta == 'yes' ) {
				include ECAFE_PATH . 'element/post-data/post-meta-' . sanitize_file_name( $postMetaStyle ) . '.php';
			}
			if ( ! empty( $readMoreButton ) && $readMoreButton == 'yes' ) {
				include ECAFE_PATH . 'element/post-data/post-read-more.php';
			}
			?>
		</div>
	</div>
</article>