<?php /** * Team post media template * * @package vogue * @since 1.0.0 */ // File Security Check if (!defined('ABSPATH')) { exit; } if (has_post_thumbnail()) { $thumb_id = get_post_thumbnail_id(); $teammate_thumb_args = array('img_meta' => wp_get_attachment_image_src($thumb_id, 'full'), 'img_id' => $thumb_id, 'options' => presscore_set_image_dimesions(), 'echo' => true, 'wrap' => '<img %IMG_CLASS% %SRC% %SIZE% %IMG_TITLE% %ALT% />'); $config = Presscore_Config::get_instance(); if ('post' == $config->get('post.open_as')) { $teammate_thumb_args['wrap'] = '<a %HREF% %CLASS%>' . $teammate_thumb_args['wrap'] . '</a>'; $teammate_thumb_args['class'] = 'rollover'; $teammate_thumb_args['href'] = get_permalink(); } else { $teammate_thumb_args['wrap'] = '<span>' . $teammate_thumb_args['wrap'] . '</span>'; } $teammate_thumb_args = presscore_add_thumbnail_class_for_masonry($teammate_thumb_args); echo '<div class="team-media">'; dt_get_thumb_img($teammate_thumb_args); echo '</div>'; }
/** * @param int $thumb_id * @param string $class * @return string */ function presscore_mod_albums_get_photo_img($thumb_id, $class = '') { $thumb_meta = wp_get_attachment_image_src($thumb_id, 'full'); $thumb_title = presscore_image_title_enabled($thumb_id) ? get_the_title() : ''; $thumb_args = array('echo' => false, 'img_meta' => $thumb_meta, 'img_id' => $thumb_id, 'img_class' => 'preload-me', 'class' => $class . ' dt-mfp-item', 'img_description' => get_the_content(), 'title' => $thumb_title, 'options' => presscore_set_image_dimesions(), 'wrap' => '<a %HREF% %CLASS% %TITLE% data-dt-img-description="%RAW_IMG_DESCRIPTION%" %CUSTOM%><img %IMG_CLASS% %SRC% %ALT% %SIZE% /></a>'); $video_url = presscore_get_image_video_url($thumb_id); if ($video_url) { $thumb_args['class'] .= ' mfp-iframe'; $thumb_args['href'] = $video_url; } else { $thumb_args['class'] .= ' mfp-image'; } // set proportion $thumb_args = presscore_add_thumbnail_class_for_masonry($thumb_args); return dt_get_thumb_img($thumb_args); }