Continues the Bookshelf history. The three plugins tracked there are consolidated into umbra-bookshelf/ and this repository becomes the canonical home for the plugin and the theme. bd-bookshelf/ -> theme/ separate artifact, name unchanged (root specs) -> umbra-bookshelf/spec/ aligned to Umbra Bookshelf old plugin zips -> archive/pre-umbra-releases/ Adds a repository README and drops the Bookshelf closure notice.
80 lines
2.9 KiB
PHP
80 lines
2.9 KiB
PHP
<?php
|
|
// Copyright 2026 Umbra Tools (umbratools.com)
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
/**
|
|
* Template Name: Series Listing
|
|
*
|
|
* @package BD_Murphy
|
|
*/
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<div class="page-container with-sidebar">
|
|
<div class="page-content">
|
|
<div class="series-container">
|
|
<header class="page-header">
|
|
<h1 class="page-title"><?php esc_html_e('Series', 'bd-bookshelf'); ?></h1>
|
|
</header>
|
|
|
|
<div class="series-list">
|
|
<?php
|
|
if (have_posts()) :
|
|
while (have_posts()) :
|
|
the_post();
|
|
$series_id = get_the_ID();
|
|
$name = esc_html(get_the_title());
|
|
$blurb = wp_kses_post(get_the_excerpt() ?: '');
|
|
|
|
$book_count = 0;
|
|
if (class_exists('BD_BookShelfHelper')) {
|
|
$book_count = BD_BookShelfHelper::get_series_book_count($series_id);
|
|
} else {
|
|
$books_in_series = get_post_meta($series_id, '_bdm_series_books', true);
|
|
if (is_array($books_in_series)) {
|
|
$book_count = count($books_in_series);
|
|
}
|
|
}
|
|
?>
|
|
<article class="series-card" <?php post_class(); ?>>
|
|
<a href="<?php the_permalink(); ?>">
|
|
<?php if (has_post_thumbnail()) : ?>
|
|
<?php the_post_thumbnail('series-card'); ?>
|
|
<?php endif; ?>
|
|
</a>
|
|
<h2 class="series-name">
|
|
<a href="<?php the_permalink(); ?>"><?php echo $name; ?></a>
|
|
</h2>
|
|
<p class="series-blurb"><?php echo $blurb; ?></p>
|
|
<p class="series-book-count">
|
|
<?php
|
|
printf(
|
|
esc_html(_n('%d book', '%d books', $book_count, 'bd-bookshelf')),
|
|
$book_count
|
|
);
|
|
?>
|
|
</p>
|
|
</article>
|
|
<?php
|
|
endwhile;
|
|
else :
|
|
?>
|
|
<p class="no-series"><?php esc_html_e('No series available yet.', 'bd-bookshelf'); ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<aside class="page-sidebar">
|
|
<?php if (is_active_sidebar('home-sidebar')) : ?>
|
|
<div class="home-sidebar">
|
|
<?php dynamic_sidebar('home-sidebar'); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</aside>
|
|
</div>
|
|
|
|
<?php
|
|
get_footer();
|