protected function echoDedicationAndEpigraph($book_contents, $metadata)
{
$front_matter_printf = '<div class="front-matter %s" id="%s">';
$front_matter_printf .= '<div class="front-matter-title-wrap"><h3 class="front-matter-number">%s</h3><h1 class="front-matter-title">%s</h1></div>';
$front_matter_printf .= '<div class="ugc front-matter-ugc">%s</div>%s';
$front_matter_printf .= '</div>';
$i = $this->frontMatterPos;
foreach (array('dedication', 'epigraph') as $compare) {
foreach ($book_contents['front-matter'] as $front_matter) {
if (!$front_matter['export']) {
continue;
// Skip
}
$front_matter_id = $front_matter['ID'];
$subclass = \Pressbooks\Taxonomy::getFrontMatterType($front_matter_id);
if ($compare != $subclass) {
continue;
//Skip
}
$slug = $front_matter['post_name'];
$title = get_post_meta($front_matter_id, 'pb_show_title', true) ? $front_matter['post_title'] : '<span class="display-none">' . $front_matter['post_title'] . '</span>';
// Preserve auto-indexing in Prince using hidden span
$content = $front_matter['post_content'];
printf($front_matter_printf, $subclass, $slug, $i, Sanitize\decode($title), $content, $this->doEndnotes($front_matter_id));
echo "\n";
++$i;
}
}
$this->frontMatterPos = $i;
}