<?php

/**
 * The template for displaying single quote post format posts.
 *
 * @package chained
 * @since chained 1.0.0
 */

if ( !defined( 'ABSPATH' ) ) {
    exit;
    // Exit if accessed directly
}

?>

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

if ( function_exists( 'sharing_display' ) && !is_attachment() ) {
    ?>
			<div class="content-with-socials">
				<?php 
    sharing_display( '', true );
    ?>
				<div class="content-and-image">
					<header class="entry-header">
						<div class="entry-meta">
							<?php 
    if ( false == get_theme_mod( 'chained_single_hide_categories', false ) ) {
        echo  chained_cats_list() ;
    }
    if ( function_exists( 'breadcrumb_trail' ) && true == get_theme_mod( 'changed_global_enable_breadcrumb', true ) ) {
        breadcrumb_trail();
    }
    ?>
						</div><!-- .entry-meta -->
						<?php 
    the_title( '<h1 class="single-entry-title">', '</h1>' );
    ?>
						<div class="entry-posted-on">
							<?php 
    chained_posted_on();
    ?>
						</div>
					</header><!-- .entry-header -->
					<?php 
    
    if ( has_post_thumbnail() ) {
        ?>
						<div class="entry-featured  entry-thumbnail">
							<?php 
        the_post_thumbnail( 'chained-single-image', array(
            'itemprop' => 'image',
        ) );
        ?>
							<div class="content-quote" itemprop="citation" itemscope itemtype="http://schema.org/Book">
								<div class="content-quote-wrapper">
									<div class="quote">
										<?php 
        echo  get_template_part( 'assets/images/svg/quote' ) ;
        ?>
									</div>
									<blockquote>
										<?php 
        the_post_thumbnail_caption();
        ?>
										<cite><?php 
        echo  get_post( get_post_thumbnail_id() )->post_content ;
        ?> </cite>
									</blockquote>
								</div>
							</div>
						</div>
					<?php 
    }
    
    ?>
					<div class="entry-content">
						<?php 
    the_content();
    ?>
						<?php 
    wp_link_pages( array(
        'before' => '<div class="page-links">' . __( 'Pages:', 'chained' ),
        'after'  => '</div>',
    ) );
    ?>
					</div><!-- .entry-content -->
				</div>
			</div>
		<?php 
} else {
    ?>
			<header class="entry-header">
				<div class="entry-meta">
					<?php 
    echo  chained_cats_list() ;
    ?>
					<?php 
    if ( function_exists( 'breadcrumb_trail' ) ) {
        breadcrumb_trail();
    }
    ?>
				</div><!-- .entry-meta -->
				<?php 
    the_title( '<h1 class="single-entry-title">', '</h1>' );
    ?>
				<div class="entry-posted-on">
					<?php 
    chained_posted_on();
    ?>
				</div>
			</header><!-- .entry-header -->
			<?php 
    
    if ( has_post_thumbnail() ) {
        ?>
				<div class="entry-featured  entry-thumbnail">
					<?php 
        the_post_thumbnail( 'chained-single-image', array(
            'itemprop' => 'image',
        ) );
        ?>
					<div class="content-quote" itemprop="citation" itemscope itemtype="http://schema.org/Book">
						<div class="content-quote-wrapper">
							<div class="quote">
								<?php 
        echo  get_template_part( 'assets/images/svg/quote' ) ;
        ?>
							</div>
							<blockquote>
								<?php 
        the_post_thumbnail_caption();
        ?>
								<cite><?php 
        echo  get_post( get_post_thumbnail_id() )->post_content ;
        ?> </cite>
							</blockquote>
						</div>
					</div>
				</div>
			<?php 
    }
    
    ?>
			<div class="entry-content">
				<?php 
    the_content();
    ?>
				<?php 
    wp_link_pages( array(
        'before' => '<div class="page-links">' . __( 'Pages:', 'chained' ),
        'after'  => '</div>',
    ) );
    ?>
			</div><!-- .entry-content -->
		<?php 
}

?> <!-- end sharing if -->
	<?php 
?> <!-- end freemius if -->
	<footer class="entry-footer">
		<?php 
chained_single_entry_footer();
?>
	</footer><!-- .entry-footer -->
</article><!-- #post-## -->