<?php
/**
 * Books Slider
 */
$booksPerPage = get_theme_mod('books_per_page', 5);
$slideToShowLargeScreen = get_theme_mod('slide_to_show', 4);
$slideToShowMediumScreen = get_theme_mod('slide_to_show_m_screen', 3);
$slideToShowSmallScreen = get_theme_mod('slide_to_show_s_screen', 1);
?>
<section id="blog-page-header-sidebar" class="blog-page-header-area">
	<div class="container">
		<div class="books-slider-widget-area">
			<div class="books-slider-wrapper">
				<?php
				$shortcode_atts = array(
                    'books_per_page'   => $booksPerPage,
                    'categories_include' => 'false',
                    'categories_exclude' => 'false',
                    'authors_include'   => 'false',
                    'authors_exclude'   => 'false',
                    'exclude_books'    => 'false',
                    'order'            => 'DESC',
                    'orderby'          => 'date',
                    'show_author'      => 'true',
                    'show_title'       => 'true',
                    'title_type'       => 'title',
                    'show_image'       => 'true',
                    'image_type'       => 'book_cover',
                    'image_position'   => 'top',
                    'show_excerpt'     => 'true',
                    'excerpt_type'     => 'excerpt',
                    'excerpt_limit'    => '30',
                    'show_price'       => 'true',
                    'show_buy_button'  => 'true',
                    'show_msl'         => 'false',
                    'msl_title_align'  => 'center',
                    'content_align'    => 'center',
                    'sts_l_screen'     => $slideToShowLargeScreen,
                    'sts_l_screen'     => $slideToShowLargeScreen,
                    'sts_m_screen'     => $slideToShowMediumScreen,
                    'sts_s_screen'     => $slideToShowSmallScreen,
                    'slider_style'     => 'carousel',
                );

                // Build the shortcode
                $shortcode = '[rswpbs_book_slider';
                foreach ( $shortcode_atts as $key => $value ) {
                    $shortcode .= ' ' . $key . '="' . esc_attr( $value ) . '"';
                }
                $shortcode .= ']';

                echo do_shortcode( $shortcode );
				?>
			</div>
		</div>
	</div>
</section>