示例#1
0
文件: tags.php 项目: ecerta/webcomic
 /**
  * Return a crossover collection image.
  * 
  * @param string $size The size of the image to return.
  * @return string
  * @uses Webcomic::$config
  * @uses Webcomic::$collection
  * @uses WebcomicTag::webcomic_crossover_image()
  * @filter string webcomic_crossover_image Filters the the image returned by `webcomic_crossover_image` and used by `webcomic_crossover_poster`.
  */
 public static function webcomic_crossover_image($size = 'full')
 {
     global $wp_query;
     if (is_tax() and $crossover = $wp_query->get('crossover')) {
         foreach (self::$config['collections'] as $k => $v) {
             if ($crossover === $v['slugs']['name']) {
                 return WebcomicTag::webcomic_collection_image($size, $k);
             }
         }
     }
 }
	</header><!-- .archive-header -->

	<article id="post-<?php 
the_ID();
?>
" <?php 
post_class("webcomic-archive-content");
?>
>
		<div class="entry-content">
			
			<?php 
if (is_webcomic_archive()) {
    ?>
				<?php 
    if (WebcomicTag::webcomic_collection_image()) {
        ?>

					<div class="page-image"><?php 
        webcomic_collection_poster();
        ?>
</div><!-- .page-image -->

				<?php 
    }
    ?>

				<?php 
    if (WebcomicTag::webcomic_collection_description()) {
        ?>
示例#3
0
 /**
  * Handle webcomic_collection_poster shortcode.
  * 
  * @param array $atts Shortcode attributes.
  * @return string
  * @uses WebcomicTag::webcomic_collection_image()
  */
 public function webcomic_collection_image($atts)
 {
     extract(shortcode_atts(array('size' => 'full', 'collection' => ''), $atts));
     return WebcomicTag::webcomic_collection_image($size, $collection);
 }