$title_tag = '<h3><a class="%s" href="#"' . $img_custom . '>%s</a></h3>'; } $title = sprintf($title_tag, dt_portfolio_classes($add_data['init_layout'], 'head', false), get_the_title()); // end pass protected ?> <div class="dt-hs-container dt-video-item <?php dt_portfolio_classes($add_data['init_layout'], 'block'); ?> "> <?php if (!post_password_required()) { $caption_hs = '<div class="highslide-caption">'; $caption_hs .= get_the_excerpt(); if (dt_is_page_soc_buttons_enabled('video') && has_post_thumbnail()) { $thumb_id = get_post_thumbnail_id(get_the_ID()); $caption_hs .= dt_get_like_window(array('img' => urlencode(current(wp_get_attachment_image_src($thumb_id, 'thumbnail'))), 'full' => urlencode(current(wp_get_attachment_image_src($thumb_id, 'full'))), 'src' => urlencode(get_permalink(get_the_ID()))), false); } $caption_hs .= '</div>'; } else { $caption_hs = ''; } $img_id = get_post_thumbnail_id(); // get alt $img_alt = get_post_meta($img_id, '_wp_attachment_image_alt', true); if (!$img_alt) { $img_alt = get_the_title(); } $img = dt_get_thumb_img(array('alt' => $img_alt, 'class' => 'photo', 'href' => '#', 'custom' => $custom, 'use_noimage' => true, 'thumb_opts' => array('w' => $add_data['thumb_w'], 'h' => $add_data['thumb_h'])), '<div class="textwidget-photo"><a %HREF% %CLASS% %TITLE% %CUSTOM%><img %ALT% %SRC% %SIZE%/></a>' . $caption_hs . '%P_FORM%</div>', false); $img = str_replace('%P_FORM%', $pass_form, $img); echo $img; ?>
// if there are images - put it to the "hidden container" if ($images->have_posts() && !post_password_required()) { $hs_group = 'dt_gallery_' . $post->ID; ?> <div class="hidden-container" data-hs_group="<?php echo $hs_group; ?> "> <?php foreach ($images->posts as $image) { dt_get_thumb_img(array('class' => 'highslide', 'alt' => get_post_meta($image->ID, '_wp_attachment_image_alt', true), 'img_meta' => wp_get_attachment_image_src($image->ID, 'full'), 'title' => esc_attr(strip_tags($image->post_excerpt)), 'thumb_opts' => array('w' => 90, 'h' => 90)), '<a %HREF% %CLASS% %TITLE% %CUSTOM%><img %ALT% %SRC% %SIZE% /></a>'); ?> <div class="highslide-caption"><?php echo $image->post_excerpt; // show like mini button if (dt_is_page_soc_buttons_enabled('gallery')) { dt_get_like_window(array('img' => urlencode(current(wp_get_attachment_image_src($image->ID, 'thumbnail'))), 'full' => urlencode(current(wp_get_attachment_image_src($image->ID, 'full'))), 'src' => urlencode(get_permalink($image->ID)))); } ?> </div> <?php } ?> </div> <?php } ?> </div>