<?php
/**
 * @package thim
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<div class="share-post">
		<div class="date-meta"><?php echo get_the_date( "d\<\i\>\ M\<\/\i\>\ " ) ?></div>
		<?php do_action( 'thim_social_share' ); ?>
	</div>
	<div class="content-inner">
		<?php
		do_action( 'thim_entry_top', 'full' ); ?>
		<div class="entry-content">
			<header class="entry-header">
				<?php the_title( sprintf( '<h1 class="blog-title">', esc_url( get_permalink() ) ), '</h1>' ); ?>
				<?php thim_entry_meta(); ?>
			</header>
			<!-- .entry-header -->
			<div class="entry-summary">
				<?php
				the_content();
				?>
			</div>
			<?php
			$event = get_post_meta( get_the_ID(), 'thim_use_event', true );
			if ( $event ) {
				$opening = get_post_meta( get_the_ID(), 'thim_time_opening', true );
				$closing = get_post_meta( get_the_ID(), 'thim_time_closing', true );
				echo '<div>
								<span class="event-time">' . esc_html__( 'Opening Time: ', 'cakeart' ) . '</span><span>' . esc_html( $opening ) . '</span>
								<br/><br/>
								<span class="event-time">' . esc_html__( 'Closing Time: ', 'cakeart' ) . '</span><span>' . esc_html( $closing ) . '</span>
							</div>';
			}
			?>
			<?php
			wp_link_pages( array(
				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'cakeart' ),
				'after'  => '</div>',
			) );
			?>
			<!-- .entry-summary -->
		</div>
	</div>
</article><!-- #post-## -->