
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php /* Init the post data */

if ( is_singular() && have_posts() ) { the_post(); }

if ( has_post_thumbnail() ) :
?>

<div class="vw-media-area">
	<div class="vw-media-area__inner">
		<?php

		if ( is_singular( 'presso_gallery' ) ) {
			$images = get_post_meta( get_the_id(), 'vw_gallery_images' );
			$layout = get_post_meta( get_the_id(), 'vw_gallery_layout', true );

			if ( ! post_password_required() && ! empty( $images ) ) :
			?>
			
				<?php if ( presso_is_proofing_enabled() ) : ?>
				<div class="vw-proofing-filter">
					<a href="#" class="vw-proofing-filter__all vw-button"><?php esc_html_e( 'All', 'presso' ); ?></a>
					<a href="#" class="vw-proofing-filter__approved vw-button vw-button--white"><?php esc_html_e( 'Approved', 'presso' ); ?></a>
					<a href="#" class="vw-proofing-filter__rejected vw-button vw-button--white"><?php esc_html_e( 'Rejected', 'presso' ); ?></a>
				</div>
				<?php endif; ?>

				<?php presso_the_gallery( $images, $layout ); ?>

			<?php endif;

			if ( empty( $images ) ) {
				presso_the_post_media();
			}

		} else {
			presso_the_post_media();

		}
		?>
	</div>
</div>

<?php
endif;

/* Rewind the post data */
if ( is_singular() && have_posts() ) { rewind_posts(); }
?>