protected function get_image_html($image_id) { $image_html = ''; if (wp_attachment_is_image($image_id)) { $image_src = wp_get_attachment_image_src($image_id, 'full'); $image_alt = get_post_meta($image_id, '_wp_attachment_image_alt', true); if (presscore_image_title_enabled($image_id)) { $image_title = ' title="' . esc_attr(get_the_title($image_id)) . '"'; } else { $image_title = ''; } $image_html = '<img class="preload-me" src="' . $image_src[0] . '" ' . image_hwstring($image_src[1], $image_src[2]) . $image_title . ' alt="' . esc_attr($image_alt) . '">'; } return $image_html; }
/** * @return string */ function presscore_mod_albums_get_photo_description() { $html = ''; $config = presscore_config(); if (presscore_image_title_enabled(get_the_ID()) && $config->get('show_titles') && ($title = get_the_title())) { $html .= sprintf('<h3 class="entry-title"><a class="dt-trigger-first-mfp" href="%s" title="%s" rel="bookmark">%s</a></h3>', get_permalink(), the_title_attribute('echo=0'), $title); } if ($config->get('show_excerpts')) { $html .= wpautop(get_the_content()); } if ($html) { $html .= presscore_post_edit_link(); } return $html; }
*/ // File Security Check if (!defined('ABSPATH')) { exit; } ?> <div class="project-list-media"> <div class="buttons-on-img"> <?php $thumb_id = get_the_ID(); $thumb_meta = wp_get_attachment_image_src($thumb_id, 'full'); $video_url = esc_url(get_post_meta($thumb_id, 'dt-video-url', true)); $thumb_title = presscore_image_title_enabled($thumb_id) ? get_the_title() : ''; $thumb_args = array('img_meta' => $thumb_meta, 'img_id' => $thumb_id, 'img_class' => 'preload-me', 'class' => 'alignnone dt-mfp-item', 'options' => presscore_set_image_dimesions(), 'img_description' => get_the_content(), 'title' => $thumb_title, 'wrap' => '<a %HREF% %CLASS% %TITLE% data-dt-img-description="%RAW_IMG_DESCRIPTION%" %CUSTOM%><img %IMG_CLASS% %SRC% %ALT% %SIZE% /></a>'); if ($video_url) { $thumb_args['class'] .= ' rollover rollover-video mfp-iframe'; $thumb_args['href'] = $video_url; } else { $thumb_args['class'] .= ' rollover rollover-zoom mfp-image'; } // set proportion $thumb_args = presscore_add_thumbnail_class_for_masonry($thumb_args); dt_get_thumb_img($thumb_args); ?> </div> </div>