?>

<?php 
do_action('presscore_before_post');
?>

<article <?php 
post_class('post');
?>
>

	<?php 
/////////////
// media //
/////////////
if (presscore_post_format_supports_media_content(get_post_format())) {
    presscore_get_template_part('theme', 'blog/masonry/blog-masonry-post-media');
}
//////////////
// content //
//////////////
presscore_get_template_part('theme', 'blog/masonry/blog-masonry-post-content');
?>

</article><!-- #post-<?php 
the_ID();
?>
 -->

<?php 
do_action('presscore_after_post');
 /**
  * Get style attribute for content parts for blog posts
  * 
  * @param  string $content_type Content type: 'content' or 'media'
  * @return string               Empty string for wide preview or if post type do not support media content, width style attribute in other case
  */
 function presscore_get_post_content_style_for_blog_list($content_type = 'content')
 {
     $config = Presscore_Config::get_instance();
     if ('wide' == $config->get('post.preview.width') || !presscore_post_format_supports_media_content(get_post_format())) {
         return '';
     } else {
         return sprintf('style="width: %s%%;"', presscore_get_blog_list_content_width($content_type));
     }
 }
예제 #3
0
<article <?php 
post_class(array('project-' . $article_content_layout));
?>
>

	<?php 
$post_format = get_post_format();
if ('odd' == $article_content_layout || 'wide' == $config->get('post.preview.width')) {
    // media
    if (presscore_post_format_supports_media_content($post_format)) {
        dt_get_template_part('blog/list/blog-list-post-media', $post_format);
    }
    // content
    dt_get_template_part('blog/list/blog-list-post-content', $post_format);
} else {
    // content
    dt_get_template_part('blog/list/blog-list-post-content', $post_format);
    // media
    if (presscore_post_format_supports_media_content($post_format)) {
        dt_get_template_part('blog/list/blog-list-post-media', $post_format);
    }
}
?>

</article><!-- #post-<?php 
the_ID();
?>
 -->

<?php 
do_action('presscore_after_post');