<?php
/**
 * Template part for displaying blog post - horizontal.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package     Business Interface
 * @author      WPInterface Team
 * @since       1.0.0
 */

?>

<?php do_action( 'business_interface_before_article' ); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'business-interface-article' ); ?><?php business_interface_schema_markup( 'article' ); ?>>

	<?php
	$business_interface_blog_entry_format = get_post_format();

	if ( 'quote' === $business_interface_blog_entry_format ) {
		get_template_part( 'template-parts/entry/format/media', $business_interface_blog_entry_format );
	} else {

		$business_interface_classes     = array();
		$business_interface_classes[]   = 'si-blog-entry-wrapper';
		$business_interface_thumb_align = business_interface_option( 'blog_image_position' );
		$business_interface_thumb_align = apply_filters( 'business_interface_horizontal_blog_image_position', $business_interface_thumb_align );
		$business_interface_classes[]   = 'si-thumb-' . $business_interface_thumb_align;
		$business_interface_classes     = implode( ' ', $business_interface_classes );
		?>

		<div class="<?php echo esc_attr( $business_interface_classes ); ?>">
			<?php get_template_part( 'template-parts/entry/entry-thumbnail' ); ?>

			<div class="si-entry-content-wrapper">

				<?php
				if ( business_interface_option( 'blog_horizontal_post_categories' ) ) {
					get_template_part( 'template-parts/entry/entry-category' );
				}

				get_template_part( 'template-parts/entry/entry-header' );
				get_template_part( 'template-parts/entry/entry-summary' );


				if ( business_interface_option( 'blog_horizontal_read_more' ) ) {
					get_template_part( 'template-parts/entry/entry-summary-footer' );
				}

				get_template_part( 'template-parts/entry/entry-meta' );
				?>
			</div>
		</div>

	<?php } ?>

</article><!-- #post-<?php the_ID(); ?> -->

<?php do_action( 'business_interface_after_article' ); ?>
