protected function createPromo($book_contents, $metadata)
{
$promo_html = apply_filters('pressbooks_epub_promo', '');
if ($promo_html) {
$file_id = 'pressbooks-promo';
$filename = "{$file_id}.{$this->filext}";
$vars = array('post_title' => __('Make your own books using Pressbooks.com', 'pressbooks'), 'stylesheet' => $this->stylesheet, 'post_content' => $this->kneadHtml($promo_html, 'custom'), 'isbn' => @$metadata['pb_ebook_isbn'], 'lang' => $this->lang);
file_put_contents($this->tmpDir . "/OEBPS/{$filename}", $this->loadTemplate($this->dir . '/templates/epub201/html.php', $vars));
$this->manifest[$file_id] = array('ID' => -1, 'post_title' => $vars['post_title'], 'filename' => $filename);
}
}