* * @since roen 1.0 */ global $portfolio_shortcode_content, $portfolio_shortcode_thumbnail_size; $portfolio_type = intval(penguin_get_post_meta_key('portfolio-type')); $output = '<div class="portfolio-wrap">'; // show gallery if ($portfolio_type == 1) { $output .= '<div class="flexslider roen-fl"> <ul class="slides">'; if (has_post_thumbnail(get_the_ID())) { $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(), $portfolio_shortcode_thumbnail_size); $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $output .= '<li><a href="' . esc_url($full_image[0]) . '" class="fancybox-thumb" rel="fancybox-thumb[portfolio-code-c3][' . get_the_ID() . ']"><img src="' . esc_url($attachment_image[0]) . '" alt="" ></a></li>'; } $output .= roen_get_gallery_list(get_the_ID(), $portfolio_shortcode_thumbnail_size, 'fancybox-thumb[portfolio-code-c3]'); $output .= '</ul> </div>'; // show video with youtube or vimeo } else { if ($portfolio_type == 2 && penguin_get_post_meta_key('video-content') != '') { $output .= do_shortcode('[' . (intval(penguin_get_post_meta_key('video-type')) == 0 ? 'youtube' : 'vimeo') . ' id="' . penguin_get_post_meta_key('video-content') . '" width="100%" height="300"]'); } else { $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $output .= '<div class="portfolio-img">'; if (has_post_thumbnail(get_the_ID())) { $output .= get_the_post_thumbnail(get_the_ID(), $portfolio_shortcode_thumbnail_size); } else { $output .= '<img src="' . get_template_directory_uri() . '/img/portfolio-no-thumbs.png" alt="">'; } $output .= '</div>
?> <li> <a href="<?php echo esc_url($full_image[0]); ?> " class="fancybox-thumb" rel="fancybox-thumb[<?php echo get_the_ID(); ?> ]"><img src="<?php echo esc_url($attachment_image[0]); ?> " alt=""></a> </li> <?php echo roen_get_gallery_list(get_the_ID(), 'post-thumbnail'); ?> </ul> </div> </div> <header class="entry-header"> <?php the_title('<h3 class="entry-title" itemprop="name"><a href="' . esc_url(get_permalink()) . '" itemprop="url">', '</a></h3>'); ?> <div class="post-meta"><span class="post-type"><i class="<?php echo roen_get_post_type_icon(get_post_format()); ?> "></i></span><span itemprop="genre"><?php $categories = get_the_category();
<li> <a href="<?php echo esc_url($full_image[0]); ?> " class="fancybox-thumb" rel="fancybox-thumb[<?php echo get_the_ID(); ?> ]"><img src="<?php echo esc_url($attachment_image[0]); ?> " alt="" ></a> </li> <?php } echo roen_get_gallery_list(get_the_ID(), $thumbnail_size); ?> </ul> </div> <?php // show video with youtube or vimeo } else { if ($portfolio_type == 2 && penguin_get_post_meta_key('video-content') != '') { echo do_shortcode('[' . (intval(penguin_get_post_meta_key('video-type')) == 0 ? 'youtube' : 'vimeo') . ' id="' . penguin_get_post_meta_key('video-content') . '" width="100%" height="300"]'); } else { ?> <div class="portfolio-img"> <?php if (has_post_thumbnail(get_the_ID())) {