<?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 post-trans">
		<?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>
		</div>
		<?php } ?>
		<div class="post-content-data">
			<?php
			if ( ! empty( $showPostMeta ) && $showPostMeta == 'yes' ) {
				include ECAFE_PATH . 'element/post-data/post-meta-' . sanitize_file_name( $postMetaStyle ) . '.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( $readMoreButton ) && $readMoreButton == 'yes' ) {
				echo '<div class="top-sep-border post-trans"></div>';
				include ECAFE_PATH . 'element/post-data/post-read-more.php';
			}
			?>
		</div>
	</div>
</article>