/** * @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); }
<?php /** * Portfolio post content part with rollover * * @since 1.0.0 * @package vogue */ // File Security Check if (!defined('ABSPATH')) { exit; } $content = presscore_mod_albums_get_photo_description(); $img_id = get_the_ID(); $img_class = 'alignnone rollover'; if (presscore_get_image_video_url($img_id)) { $img_class .= ' rollover-video'; } else { $img_class .= ' rollover-zoom'; } $image = presscore_mod_albums_get_photo_img($img_id, $img_class); $template_args = array('image' => $image, 'content' => $content, 'figure_class' => 'links-hovers-disabled'); presscore_get_template_part('theme', 'post-layouts/description-under-image-odd', null, $template_args);
* Project template with description under image. * * @package the7\Portfolio\Templates * @since 3.0.0 */ // File Security Check if (!defined('ABSPATH')) { exit; } $image = $rollover_content = $rollover_class = ''; // media switch (presscore_config()->get('post.preview.media.style')) { case 'featured_image': $image_id = has_post_thumbnail() ? get_post_thumbnail_id() : 0; $link_class = 'alignnone'; $link_class .= presscore_get_image_video_url($image_id) ? ' rollover-video' : ' rollover'; $image = presscore_project_get_thumbnail_img($image_id, $link_class); // rollover icons $rollover_content = presscore_project_get_preview_buttons($image_id); if (1 == presscore_project_preview_buttons_count()) { $rollover_class .= ' rollover-active'; } break; case 'slideshow': $slider_classes = array('alignnone', 'slider-simple'); if ('grid' != presscore_config()->get('layout')) { $slider_classes[] = 'slider-masonry'; } $image = presscore_get_project_media_slider($slider_classes); break; }
<?php /** * Portfolio post content part with rollover * * @since 1.0.0 * @package vogue */ // File Security Check if (!defined('ABSPATH')) { exit; } $content = presscore_mod_albums_get_photo_description(); $img_id = get_the_ID(); $img_class = ''; if (!$content) { $img_class .= ' rollover'; $img_class .= presscore_get_image_video_url($img_id) ? ' rollover-video' : ' rollover-zoom'; } $image = presscore_mod_albums_get_photo_img($img_id, $img_class); $template_args = array('image' => $image, 'content' => $content, 'figure_class' => 'links-hovers-disabled'); presscore_get_template_part('theme', 'post-layouts/description-on-image', null, $template_args);