/**
 * If the current book is linked to a post, prints an HTML link to said post.
 * @param bool $echo Whether or not to echo the results.
 */
function book_post_link($echo = true)
{
    global $book;
    if (!book_has_post()) {
        return;
    }
    $link = '<a href="' . book_post_url(0) . '">' . book_post_title(0) . '</a>';
    if ($echo) {
        echo $link;
    }
    return $link;
}
Beispiel #2
0
" /></a>
			</p>
			
			<?php 
        if (!is_custom_book()) {
            ?>
				<p>You can view this book's Amazon detail page <a href="<?php 
            book_url();
            ?>
">here</a>.</p>
			<?php 
        }
        ?>
			
			<?php 
        if (book_has_post()) {
            ?>
				<p>This book is linked with the post <a href="<?php 
            book_post_url();
            ?>
">&ldquo;<?php 
            book_post_title();
            ?>
&rdquo;</a>.</p>
			<?php 
        }
        ?>
			
			<p>Tags: <?php 
        print_book_tags(1);
        ?>
Beispiel #3
0
			<?php library_search_form() ?>
			
			<p><a href="<?php library_url() ?>">&larr; Back to library</a></p>
			
			<h2><?php book_title() ?></h2>
			<p>By <a href="<?php book_author_permalink() ?>"><?php book_author() ?></a></p>
			
			<p>
				<a href="<?php book_url() ?>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a>
			</p>
			
			<?php if( !is_custom_book() ): ?>
				<p>You can view this book's Amazon detail page <a href="<?php book_url() ?>">here</a>.</p>
			<?php endif; ?>
			
			<?php if( book_has_post() ): ?>
				<p>This book is linked with the post <a href="<?php book_post_url() ?>">&ldquo;<?php book_post_title() ?>&rdquo;</a>.</p>
			<?php endif; ?>
			
			<p>Tags: <?php print_book_tags(1) ?></p>
			
			<dl>
				<dt>Started reading:</dt>
				<dd><?php book_started() ?></dd>
				
				<dt>Finished reading:</dt>
				<dd><?php book_finished() ?></dd>
				
				<?php print_book_meta(0); ?>
			</dl>