|
|
@ -7,14 +7,9 @@ |
|
|
|
* @package Aldine |
|
|
|
* @package Aldine |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use function Aldine\Helpers\get_catalog_data; |
|
|
|
use function Aldine\Helpers\get_catalog_data; |
|
|
|
use function Aldine\Helpers\has_sections; |
|
|
|
use function Aldine\Helpers\has_sections; |
|
|
|
|
|
|
|
|
|
|
|
$front_page_catalog = get_option( 'pb_front_page_catalog' ); |
|
|
|
|
|
|
|
$pb_front_page_catalog_title = get_option( 'pb_front_page_catalog_title' ); |
|
|
|
$pb_front_page_catalog_title = get_option( 'pb_front_page_catalog_title' ); |
|
|
|
$latest_books_title = ( ! empty( $pb_front_page_catalog_title ) ) ? $pb_front_page_catalog_title : __( 'Our Latest Titles', 'pressbooks-aldine' ); |
|
|
|
$latest_books_title = ( ! empty( $pb_front_page_catalog_title ) ) ? $pb_front_page_catalog_title : __( 'Our Latest Titles', 'pressbooks-aldine' ); |
|
|
|
if ( get_option( 'pb_front_page_catalog' ) ) { |
|
|
|
if ( get_option( 'pb_front_page_catalog' ) ) { |
|
|
@ -24,6 +19,11 @@ if ( get_option( 'pb_front_page_catalog' ) ) { |
|
|
|
$next_page = $page + 1; |
|
|
|
$next_page = $page + 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$catalog_page = \Aldine\Helpers\get_catalog_page(); |
|
|
|
|
|
|
|
if ( $catalog_page ) { |
|
|
|
|
|
|
|
$catalog_permalink = get_permalink( $catalog_page->ID ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
?> |
|
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
|
@ -56,9 +56,9 @@ if ( get_option( 'pb_front_page_catalog' ) ) { |
|
|
|
<div id="latest-books" class="latest-books"> |
|
|
|
<div id="latest-books" class="latest-books"> |
|
|
|
<h2 id="latest-books-title"><?php echo $latest_books_title; ?></h2>
|
|
|
|
<h2 id="latest-books-title"><?php echo $latest_books_title; ?></h2>
|
|
|
|
<div class="slider" role="region" aria-labelledby="latest-books-title" data-total-pages="<?php echo $catalog_data['pages']; ?>"
|
|
|
|
<div class="slider" role="region" aria-labelledby="latest-books-title" data-total-pages="<?php echo $catalog_data['pages']; ?>"
|
|
|
|
<?php |
|
|
|
<?php |
|
|
|
if ( $next_page <= $catalog_data['pages'] ) : |
|
|
|
if ( $next_page <= $catalog_data['pages'] ) : |
|
|
|
?> |
|
|
|
?> |
|
|
|
data-next-page="<?php echo $next_page; ?>"<?php endif; ?>>
|
|
|
|
data-next-page="<?php echo $next_page; ?>"<?php endif; ?>>
|
|
|
|
<ul class="books"> |
|
|
|
<ul class="books"> |
|
|
|
<?php |
|
|
|
<?php |
|
|
@ -73,7 +73,7 @@ if ( get_option( 'pb_front_page_catalog' ) ) { |
|
|
|
?> |
|
|
|
?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p class="catalog-link"> |
|
|
|
<p class="catalog-link"> |
|
|
|
<a class="call-to-action" href="<?php echo network_home_url( '/catalog/' ); ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
|
|
|
|
<a class="call-to-action" href="<?php echo $catalog_permalink ?? ''; ?>"><?php _e( 'View Complete Catalog', 'pressbooks-aldine' ); ?></a>
|
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<?php endif; ?> |
|
|
|
<?php endif; ?> |
|
|
|