Ejemplo n.º 1
0
 function shamrock_get_post_media($format)
 {
     $media = '';
     if (empty($format)) {
         return $media;
     }
     if ($format != 'image') {
         $media = hybrid_media_grabber(array('type' => $format, 'split_media' => true));
     } else {
         if (has_post_thumbnail()) {
             $media = '<figure class="post-thumbnail">';
             $full_img = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
             $media .= '<a href="' . esc_url($full_img[0]) . '" class="smr-image-format">' . shamrock_get_featured_image() . '</a>';
             if ($caption = get_post(get_post_thumbnail_id())->post_excerpt) {
                 $media .= '<figcaption>' . $caption . '</figcaption>';
             }
         }
     }
     return $media;
 }
Ejemplo n.º 2
0
post_class('smr-post');
?>
>

	<div class="entry-header-wrapper">

		<?php 
$format = get_post_format();
?>

		<?php 
if (empty($format) && shamrock_get_option('single_show_fimg') && has_post_thumbnail()) {
    ?>
			<figure class="post-thumbnail">
				<?php 
    echo shamrock_get_featured_image();
    ?>
				<?php 
    if ($caption = get_post(get_post_thumbnail_id())->post_excerpt) {
        ?>
					<div class="smr-photo-caption"><?php 
        echo $caption;
        ?>
</div>
				<?php 
    }
    ?>
			</figure>
		<?php 
}
?>