<?php if ( has_post_thumbnail() ) : ?>
	<?php $meta = lifeline_get( lifeline()->meta( get_the_ID() ), 'img' ); ?>
	<?php
	if ( $meta ) :
		$meta = explode( ',', $meta );
		wp_enqueue_script( array( 'slick', 'slick-init' ) );
		?>
		<div class="blog-detail-gallery" data-slickCarousel data-options='{
									"arrows": true,
									"initialSlide": 0,
									"infinite": true,
									"slidesToShow": 1,
									"slidesToScroll": 1,
									"fade": true,
									"autoplay": true,
									"autoplaySpeed": 4000,
									"cssEase": "cubic-bezier(0.7, 0, 0.3, 1)",
									"speed": 1000,
									"draggable": true,
									"dots": false,
									"pauseOnDotsHover": true,
									"pauseOnFocus": false,
									"pauseOnHover": true
								}'>
			<?php foreach ( $meta as $img ) : ?>
				<div class="blog-detail-gallery-item">
					<?php echo wp_get_attachment_image( $img, 'lifeline_1110x504', false, array( 'class' => 'img-fluid w-100' ) ); ?>
				</div>
			<?php endforeach; ?>
		</div>
	<?php endif; ?>
<?php endif; ?>
