예제 #1
0
    echo $about_unlimited;
    ?>
</p>
								<?php 
}
?>
							<!-- if there is a custom copyright description -->
							<?php 
if (!empty($metadata['pb_custom_copyright'])) {
    ?>
									<h2><?php 
    _e('Copyright', 'pressbooks');
    ?>
</h2>
									<p><?php 
    $custom_copyright = pb_decode($metadata['pb_custom_copyright']);
    $custom_copyright = preg_replace('/<p[^>]*>(.*)<\\/p[^>]*>/i', '$1', $custom_copyright);
    echo $custom_copyright;
    ?>
									</p>
							<?php 
}
?>
						</div>

								<?php 
$args = $args = array('post_type' => 'back-matter', 'tax_query' => array(array('taxonomy' => 'back-matter-type', 'field' => 'slug', 'terms' => 'about-the-author')));
?>


								<div class="author-book-info">
예제 #2
0
    ?>
					<p class="sub-title"><?php 
    echo $metadata['pb_about_140'];
    ?>
</p>
					<span class="detail"></span>
				<?php 
}
?>
						
				
				<?php 
if (!empty($metadata['pb_about_50'])) {
    ?>
					<p><?php 
    echo pb_decode($metadata['pb_about_50']);
    ?>
</p>
				<?php 
}
?>
		
			</div> <!-- end .book-info -->
			
				<?php 
if (!empty($metadata['pb_cover_image'])) {
    ?>
				<div class="book-cover">
				
						<img src="<?php 
    echo $metadata['pb_cover_image'];
예제 #3
0
			
			<!-- Books -->
			<?php 
foreach ($books as $b) {
    ?>
				<div class="book-data mix<?php 
    echo _tag_classes($b);
    ?>
">
	
					<div class="book">
						<p class="book-description"><a href="<?php 
    echo get_site_url($b['blogs_id'], '', 'http');
    ?>
"><?php 
    echo wp_trim_words(strip_tags(pb_decode($b['about'])), 50, '...');
    ?>
<span class="book-link">&rarr;</span></a></p>
						<img src="<?php 
    echo $b['cover_url']['pb_cover_medium'];
    ?>
" alt="book-cover" width="225" height="<?php 
    echo $b['cover_height'];
    ?>
" />
					</div><!-- end .book -->
	
					<div class="book-info">
						<h2><?php 
    echo $b['title'];
    ?>
예제 #4
0
			<section class="second-block-wrap"> 
				<div class="second-block clearfix">
						<div class="description-book-info">
							<?php 
$metadata = pb_get_book_information();
?>
							<h2><?php 
_e('Book Description', 'pressbooks');
?>
</h2>
								<?php 
if (!empty($metadata['pb_about_unlimited'])) {
    ?>
									<p><?php 
    $about_unlimited = pb_decode($metadata['pb_about_unlimited']);
    $about_unlimited = preg_replace('/<p[^>]*>(.*)<\\/p[^>]*>/i', '$1', $about_unlimited);
    // Make valid HTML by removing first <p> and last </p>
    echo $about_unlimited;
    ?>
</p>
								<?php 
}
?>
	
								
									<div id="share">
										<?php 
$social_media = get_option('pressbooks_theme_options_web');
if (1 === @$social_media['social_media'] || !isset($social_media['social_media'])) {
    ?>
											<div id="twitter" data-url="<?php 
				<?php if ( ! empty( $metadata['pb_author'] ) ): ?>
				<p class="book-author vcard author"><span class="fn"><?php echo $metadata['pb_author']; ?></span></p>
			     	<span class="stroke"></span>
				<?php endif; ?>
				
				<?php if ( ! empty( $metadata['pb_contributing_authors'] ) ): ?>
					<p class="book-author"><?= $metadata['pb_contributing_authors']; ?> </p>
				<?php endif; ?>
					
				<?php if ( ! empty( $metadata['pb_about_140'] ) ) : ?>
					<p class="sub-title"><?php echo $metadata['pb_about_140']; ?></p>
					<span class="detail"></span>
				<?php endif; ?>						
				
				<?php if ( ! empty( $metadata['pb_about_50'] ) ): ?>
					<p><?php echo pb_decode( $metadata['pb_about_50'] ); ?></p>
				<?php endif; ?>
		
			</div> <!-- end .book-info -->
			
				<?php if ( ! empty( $metadata['pb_cover_image'] ) ): ?>
				<div class="book-cover">
				
						<img src="<?php echo $metadata['pb_cover_image']; ?>" alt="book-cover" title="<?php bloginfo( 'name' ); ?> book cover" />
					
				</div>	
				<?php endif; ?>
				
				<div class="call-to-action-wrap">
					<?php global $first_chapter; ?>
					<div class="call-to-action">
예제 #6
0
	$metadata = pb_get_book_information();
	restore_current_blog(); ?>
	
	<article id="post-<?php echo $book['blog_id']; ?>" <?php post_class('catalog-book'); ?>>
	
		<a href="//<?php echo $book['domain'] . $book['path']; ?>" title="<?php echo $metadata['pb_title']; ?>"><img src="<?php echo $metadata['pb_cover_image']; ?>" width="500" height="650" alt="<?php echo $metadata['pb_title']; ?>" /></a>
		
		<header class="entry-header">
			<h2 class="entry-title"><a href="//<?php echo $book['domain'] . $book['path']; ?>" title="<?php echo $metadata['pb_title']; ?>"><?php echo $metadata['pb_title']; ?></a></h2>			
			
			<p class="entry-author"><?php echo $metadata['pb_author']; ?></p>
		</header><!-- .entry-header -->
		
		<div class="entry-content">
			<?php if ( isset( $metadata['pb_about_50'] ) ) : ?>
			<p><?php $about = pb_decode( $metadata['pb_about_50'] );
			if ( strlen( $about ) > 140){
				$about =  substr( $about, 0, 140 ) . '...';
			} echo $about; ?></p>			
			<?php endif; ?>
		</div><!-- .entry-content -->
	
		<footer class="entry-footer">
		
			<div class="button-wrap">
				<a href="//<?php echo $book['domain'] . $book['path']; ?>" class="more-btn"><?php _e('Read more', 'pressbooks-publisher'); ?></a>
			</div>	
			
			<?php if ( isset( $metadata['pb_keywords_tags'] ) ) : ?>
			<span class="book-tag"><?php echo $metadata['pb_keywords_tags']; ?></span>
			<?php endif; ?>