<?php /** * Blog entry link format media * * @package Total WordPress theme * @subpackage Partials * @version 3.0.0 */ // Exit if accessed directly if (!defined('ABSPATH')) { exit; } // Display media if thumbnail exists if ($thumbnail = wpex_get_blog_entry_thumbnail()) { ?> <div class="blog-entry-media entry-media clr"> <a href="<?php wpex_permalink(); ?> " title="<?php wpex_esc_title(); ?> " rel="bookmark" class="blog-entry-media-link<?php wpex_entry_image_animation_classes(); ?> "> <?php
"> <?php // Loop through attachments foreach ($attachments as $attachment) { ?> <?php // Get attachment data $lightbox_url = $lightbox_enabled ? wpex_get_lightbox_image($attachment) : ''; $attachment_data = wpex_get_attachment_data($attachment); $attachment_alt = $attachment_data['alt']; $attachment_video = $attachment_data['video']; $attachment_caption = $attachment_data['caption']; // Get image output $attachment_html = wpex_get_blog_entry_thumbnail(array('attachment' => $attachment, 'alt' => $attachment_alt)); ?> <div class="wpex-slider-slide sp-slide"> <?php // Display attachment video if ($attachment_video && !is_wp_error($attachment_video = wp_oembed_get($attachment_video))) { ?> <div class="wpex-slider-video responsive-video-wrap"> <?php echo $attachment_video; ?> </div><!-- .wpex-slider-video -->
/** * Returns the blog entry thumbnail * * @since 1.0.0 */ function wpex_blog_entry_thumbnail($args = '') { echo wpex_get_blog_entry_thumbnail($args); }