コード例 #1
0
ファイル: template-tags.php プロジェクト: TyRichards/paradox
 /**
  * Return the portfolio media portion of content
  * @param  int $p    the post id
  * @param  array $meta the meta content
  * @return string       HTML for output
  */
 function base_portfolio_media($p, $meta)
 {
     $output = '<div class="portfolio-media-main">';
     if ($meta['display_video']) {
         // if showing a video, it gets featured spot
         if ($meta['display_gallery'] && $meta['display_audio']) {
             // if showing audio and gallery, add audio to gallery code
             add_filter('base_filter_gallery_content', 'base_add_audio_to_gallery', 10, 2);
             // add gallery to output
             $output .= base_post_gallery($p, 'post-thumbnail', 'stacked');
         } elseif ($meta['display_audio']) {
             // showing video and audio; video gets preemo spot, add audio here
             $output .= base_print_audio_html($p);
         } elseif ($meta['display_gallery']) {
             // showing video and gallery; video gets preemo spot, add gallery here
             $output .= base_post_gallery($p, 'post-thumbnail', 'stacked');
         }
     } elseif ($meta['display_audio']) {
         // if showing audio it gets featured spot
         if ($meta['display_gallery']) {
             // showing audio and gallery; audio gets preemo spot, add gallery here
             $output .= base_post_gallery($p, 'full', 'stacked');
         }
     } elseif ($meta['display_gallery']) {
         // displaying only a gallery; featured image in preemo spot, add gallery here
         $output .= base_post_gallery($p, 'post-thumbnail', 'stacked');
     }
     $output .= '</div>';
     echo $output;
 }
コード例 #2
0
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
<?php 
zilla_post_start();
?>

	<?php 
if (is_singular('post')) {
    echo base_post_gallery($post->ID, 'full');
} else {
    echo base_post_gallery($post->ID, 'blog-thumb');
}
?>

	<!--BEGIN .entry-header-->
	<header class="entry-header">
		<?php 
if (is_singular()) {
    base_post_title();
    base_post_meta_header();
} else {
    base_post_meta_header();
    base_post_title();
}
?>
	<!--END .entry-header-->