-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.php
25 lines (23 loc) · 621 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
get_header();
?>
<?php if ( \PressbooksBook\Helpers\is_book_public() ) : ?>
<section class="block block-toc">
<?php
if ( pb_get_first_post_id() ) :
?>
<h2 class="block__title block-toc__title"><?php _e( 'Contents', 'pressbooks-book' ); ?></h2>
<?php
include( locate_template( 'partials/content-toc.php' ) );
else :
echo apply_filters( 'the_content', __( 'This book does not contain any public content.', 'pressbooks-book' ) );
endif;
?>
</section>
<?php else : ?>
<?php get_template_part( 'private' ); ?>
<?php endif; ?>
<?php get_footer(); ?>