<?php
/**
 * The template for displaying testimonial items
 *
 * @package Audioman
 */
?>

<?php
$enable = get_theme_mod( 'audioman_testimonial_option', 'disabled' );

if ( ! audioman_check_section( $enable ) ) {
	// Bail if featured content is disabled
	return;
}

$type = 'jetpack-testimonial';

// Jetpack 14.2+ stores archive title/content as a theme_mod array (jetpack_testimonials).
// Fall back to the old flat WP option for sites that have not migrated yet.
$jetpack_testimonials = (array) get_theme_mod( 'jetpack_testimonials', array() );
$headline     = ! empty( $jetpack_testimonials['page-title'] ) ? $jetpack_testimonials['page-title'] : get_option( 'jetpack_testimonial_title' );
$subheadline  = ! empty( $jetpack_testimonials['page-content'] ) ? $jetpack_testimonials['page-content'] : get_option( 'jetpack_testimonial_content' );

$layouts = 1;

$classes[] = 'section testimonial-content-section';

$classes[] ='layout-one';#header-navigation-area { background-color: #3853a4; } #primary-menu-toggle .site-navigation a { color: #fff; }

if ( ! $headline && ! $subheadline ) {
	$classes[] = 'no-headline';
}
?>

<div id="testimonial-content-section" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
	<div class="wrapper">
		<?php if ( $headline || $subheadline ) : ?>
		<div class="section-heading-wrapper">
			<?php if ( $headline ) : ?>
				<div class="section-title-wrapper">
					<h2 class="section-title"><?php echo wp_kses_post( $headline ); ?></h2>
				</div><!-- .section-title-wrapper -->
			<?php endif; ?>

			<?php if ( $subheadline ) : ?>
				<div class="taxonomy-description-wrapper">
					<p class="section-subtitle"><?php echo wp_kses_post( $subheadline ); ?></p>
				</div><!-- .taxonomy-description-wrapper -->
			<?php endif; ?>
		</div><!-- .section-heading-wrap -->
		<?php endif; ?>

		<div class="section-content-wrapper testimonial-content-wrapper">
		
			<div class="controller">
				<!-- prev link -->
				<button id="testimonial-slider-prev" class="cycle-prev" aria-label="<?php esc_attr_e( 'Previous', 'audioman' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Previous Slide', 'audioman' ); ?></span></button>

				<!-- empty element for pager links -->
				<div id="testimonial-slider-pager" class="cycle-pager"></div>


				<!-- next link -->
				<button id="testimonial-slider-next" class="cycle-next" aria-label="<?php esc_attr_e( 'Next', 'audioman' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Next Slide', 'audioman' ); ?></span></button>
				
			</div><!-- #controller-->

			<div class="cycle-slideshow"
				data-cycle-log            = "false"
				data-cycle-fx             = "scrollHorz"
				data-cycle-timeout        = "4000"
				data-cycle-pause-on-hover = "true"
				data-cycle-swipe          = "true"
				data-cycle-auto-height    = container
				data-cycle-loader         = false
				data-cycle-slides         = ".testimonial_slider_wrap"
				data-cycle-prev           = .cycle-prev
				data-cycle-next           = .cycle-next
				data-cycle-pager          = "#testimonial-slider-pager"
				data-cycle-prev           = "#testimonial-slider-prev"
				data-cycle-next           = "#testimonial-slider-next"
				>

				<div class="testimonial_slider_wrap">

			<?php
				get_template_part( 'template-parts/testimonial/post-types', 'testimonial' );
			?>

				</div><!-- .testimonial_slider_wrap -->
			</div><!-- .cycle-slideshow -->
		</div><!-- .section-content-wrap -->
	</div><!-- .wrapper -->
</div><!-- .testimonial-content-section -->
