function presscore_single_post_navigation_bar() { if (!(is_single() && presscore_is_content_visible())) { return; } switch (get_post_type()) { case 'post': $post_meta = presscore_new_posted_on('single_post'); break; case 'dt_portfolio': $post_meta = presscore_new_posted_on('single_dt_portfolio'); break; case 'dt_gallery': $post_meta = presscore_new_posted_on('single_dt_gallery'); break; default: $post_meta = ''; } $post_navigation = presscore_post_navigation(); if ($post_meta || $post_navigation) { $article_top_bar_html_class = 'article-top-bar ' . presscore_get_page_title_bg_mode_html_class(); if (!$post_meta) { $article_top_bar_html_class .= ' post-meta-disabled'; } echo '<div class="' . $article_top_bar_html_class . '"><div class="wf-wrap"><div class="wf-container-top">'; echo presscore_get_post_meta_wrap($post_meta); echo '<div class="navigation-inner"><div class="single-navigation-wrap">' . $post_navigation . '</div></div>'; echo '</div></div></div>'; } }
<div class="blog-content wf-td"> <h2 class="entry-title"> <a href="<?php the_permalink(); ?> " title="<?php echo the_title_attribute('echo=0'); ?> " rel="bookmark"><?php the_title(); ?> </a> </h2> <?php echo presscore_new_posted_on('post'); ?> <?php presscore_the_excerpt(); ?> <?php echo presscore_get_post_meta_wrap(presscore_get_blog_post_date(), 'post-format'); ?> <?php echo presscore_post_details_link(); ?> <?php
<?php /** * Portfolio post content part with rollover * * @package vogue * @since 1.0.0 */ // File Security Check if (!defined('ABSPATH')) { exit; } $config = presscore_get_config(); if ($config->get('show_titles') && get_the_title()) { ?> <h3 class="entry-title"><?php the_title(); ?> </h3> <?php } if ($config->get('show_excerpts')) { the_excerpt(); } echo presscore_new_posted_on('dt_portfolio');
/** * Get related posts attachments data slightly modified. * * @return array Attachments data. */ function presscore_get_related_posts($options = array()) { $default_options = array('select' => 'only', 'exclude_current' => true, 'args' => array()); $options = wp_parse_args($options, $default_options); // exclude current post if in the loop if (in_the_loop() && $options['exclude_current']) { $options['args'] = array_merge($options['args'], array('post__not_in' => array(get_the_ID()))); } $posts = presscore_get_posts_in_categories($options); update_post_thumbnail_cache($posts); $attachments_ids = array(); $attachments_data_override = array(); $posts_data = array(); // get posts attachments id if ($posts->have_posts()) { global $post; $post_back = $post; while ($posts->have_posts()) { $posts->the_post(); // thumbnail or first attachment id if (has_post_thumbnail()) { $attachment_id = get_post_thumbnail_id(); } else { if ($attachment = presscore_get_first_image()) { $attachment_id = $attachment->ID; } else { $attachment_id = 0; } } switch (get_post_type()) { case 'post': $post_meta = presscore_new_posted_on('post'); break; case 'dt_portfolio': $post_meta = presscore_new_posted_on('dt_portfolio'); break; default: $post_meta = presscore_new_posted_on(); } $post_data = array(); ///////////////////////// // attachment data // ///////////////////////// $post_data['full'] = $post_data['width'] = $post_data['height'] = ''; $meta = wp_get_attachment_image_src($attachment_id, 'full'); if (!empty($meta)) { $post_data['full'] = esc_url($meta[0]); $post_data['width'] = absint($meta[1]); $post_data['height'] = absint($meta[2]); } $post_data['thumbnail'] = wp_get_attachment_image_src($attachment_id, 'thumbnail'); $post_data['caption'] = ''; $post_data['video_url'] = esc_url(get_post_meta($attachment_id, 'dt-video-url', true)); $post_data['mime_type_full'] = get_post_mime_type($attachment_id); $post_data['mime_type'] = dt_get_short_post_myme_type($attachment_id); $post_data['ID'] = $attachment_id; $post_data['image_attachment_data'] = array('caption' => $post_data['caption'], 'description' => wp_kses_post(get_post_field('post_content', $attachment_id)), 'title' => presscore_imagee_title_is_hidden($attachment_id) ? '' : get_the_title($attachment_id), 'permalink' => get_permalink($attachment_id), 'video_url' => $post_data['video_url'], 'ID' => $attachment_id); /////////////////// // post data // /////////////////// $post_data['title'] = get_the_title(); $post_data['permalink'] = get_permalink(); $post_data['link'] = presscore_get_project_link('project-link'); $post_data['description'] = get_the_excerpt(); $post_data['alt'] = get_the_title(); $post_data['parent_id'] = get_the_ID(); $post_data['meta'] = $post_meta; // save data $posts_data[] = $post_data; } $post = $post_back; setup_postdata($post); } return $posts_data; }
} ?> <div class="blog-content wf-td"> <h2 class="entry-title"> <a href="javascript: void(0);" class="trigger-first-post-pp" title="<?php echo esc_attr(the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a> </h2> <?php echo presscore_new_posted_on('dt_gallery'); ?> <?php the_excerpt(); ?> <a href="javascript: void(0);" class="trigger-first-post-pp" rel="nofollow"><?php _ex('Details', 'details button', 'the7mk2'); ?> </a> <?php echo presscore_post_edit_link(); ?> </div>
echo $media; echo $before_description; if ($is_new_hover) { echo $image_hover; } if ($is_new_hover) { echo '<div class="rollover-content-container">'; } if ('from_bottom' == $description) { echo '<div class="rollover-content-wrap">'; } if ($show_title) { echo '<h2 class="entry-title">' . $post_title . '</h2>'; } if ($show_meta) { $post_meta_info = presscore_new_posted_on('dt_gallery'); if (in_array($description, array('on_hoover_centered', 'on_dark_gradient', 'from_bottom'))) { $post_meta_info = preg_replace("/(?<=href=(\"|'))[^\"']+(?=(\"|'))/", 'javascript: void(0);', $post_meta_info); } echo $post_meta_info; } if ($show_excerpts) { the_excerpt(); } if ($show_meta && !$desc_on_hover) { echo '<a href="#" class="details more-link dt-trigger-first-mfp">' . __('View album', LANGUAGE_ZONE) . '</a>'; echo '<div class="num-of-items">'; if ($images_count) { echo '<span class="num-of-images">' . $images_count . '</span> '; } if ($videos_count) {
} if ($is_new_hover) { echo '<div class="rollover-content-container">'; } if ('from_bottom' == $description) { echo '<div class="rollover-content-wrap">'; } if ($show_title) { $title = get_the_title(); if (!$is_new_hover) { $title = sprintf('<a href="%s" title="%s" rel="bookmark">%s</a>', get_permalink($post->ID), the_title_attribute('echo=0'), $title); } echo '<h2 class="entry-title">' . $title . '</h2>'; } if ($show_terms) { $post_meta_info = presscore_new_posted_on('dt_portfolio'); if ($is_new_hover) { $post_meta_info = preg_replace("/(?<=href=(\"|'))[^\"']+(?=(\"|'))/", 'javascript: void(0);', $post_meta_info); } echo $post_meta_info; } if ($show_excerpts) { the_excerpt(); } if ('on_hoover' == $description || 'under_image' == $description && in_array($under_image_buttons, array('under_image', 'on_hoover_under'))) { echo $post_buttons; } if ($show_content && !$desc_on_hover) { echo presscore_post_edit_link(); } if ('from_bottom' == $description) {
$thumb_meta = wp_get_attachment_image_src($thumb_id, 'full'); dt_get_thumb_img(array('class' => $img_class . ' rollover dt-single-mfp-popup dt-mfp-item mfp-image', 'img_meta' => $thumb_meta, 'img_id' => $thumb_id, 'options' => $img_options, 'wrap' => '<a %HREF% %CLASS% %CUSTOM% %IMG_TITLE% data-dt-img-description="%RAW_TITLE%"><img %IMG_CLASS% %SRC% %SIZE% %IMG_TITLE% %ALT% /></a>')); } } ?> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', LANGUAGE_ZONE), 'after' => '</div>')); ?> <?php $post_meta = presscore_new_posted_on('post'); $share_buttons = presscore_display_share_buttons('post', array('echo' => false)); $share_buttons = str_replace('class="entry-share', 'class="entry-share wf-td', $share_buttons); if ($share_buttons || $post_meta) { printf('<div class="post-meta wf-table wf-mobile-collapsed">%s%s</div>', $post_meta ? $post_meta : '', $share_buttons ? $share_buttons : ''); } ?> <?php // 'theme options' -> 'general' -> 'show author info on blog post pages' if (of_get_option('general-show_author_in_blog', true)) { presscore_display_post_author(); } ?> <?php
<div class="blog-content wf-td"> <h2 class="entry-title"> <a href="<?php the_permalink(); ?> " title="<?php echo esc_attr(the_title_attribute('echo=0')); ?> " rel="bookmark"><?php the_title(); ?> </a> </h2> <?php echo presscore_new_posted_on(); ?> <?php if ('product' == get_post_type()) { ?> <?php echo wp_trim_excerpt(); ?> <?php } else { ?> <?php the_excerpt(); ?> <?php
/** * Get related posts attachments data slightly modified. * * @return array Attachments data. */ function presscore_get_related_posts($options = array()) { $default_options = array('select' => 'only', 'exclude_current' => true, 'args' => array()); $options = wp_parse_args($options, $default_options); // exclude current post if in the loop if (in_the_loop() && $options['exclude_current']) { $options['args'] = array_merge($options['args'], array('post__not_in' => array(get_the_ID()))); } $posts = presscore_get_posts_in_categories($options); $attachments_ids = array(); $attachments_data_override = array(); $posts_data = array(); // get posts attachments id if ($posts->have_posts()) { while ($posts->have_posts()) { $posts->the_post(); // thumbnail or first attachment id if (has_post_thumbnail()) { $attachments_ids[] = get_post_thumbnail_id(); } else { if ($attachment = presscore_get_first_image()) { $attachments_ids[] = $attachment->ID; } else { $attachments_ids[] = 0; } } switch (get_post_type()) { case 'post': $post_meta = presscore_new_posted_on('post'); break; case 'dt_portfolio': $post_meta = presscore_new_posted_on('dt_portfolio'); break; default: $post_meta = presscore_new_posted_on(); } $attachments_data_override[] = array('permalink' => get_permalink(), 'link' => presscore_get_project_link('project-link'), 'title' => get_the_title(), 'description' => get_the_excerpt(), 'alt' => get_the_title(), 'parent_id' => get_the_ID(), 'meta' => $post_meta); } wp_reset_postdata(); } if ($attachments_ids) { // what we want $attachments_data = presscore_get_attachment_post_data($attachments_ids); // what we get $attachments_data_ids = array(); if ($attachments_data) { $attachments_data_ids = wp_list_pluck($attachments_data, 'ID'); } $default_image = presscore_get_default_image(); foreach ($attachments_ids as $key => $id) { $attachments_data_key = array_search($id, $attachments_data_ids); // if there are image - add it to array if (false !== $attachments_data_key) { $posts_data[$key] = $attachments_data[$attachments_data_key]; // or add noimage } else { $posts_data[$key] = array('full' => $default_image[0], 'width' => $default_image[1], 'height' => $default_image[2]); } if (isset($attachments_data_override[$key])) { $posts_data[$key] = array_merge($posts_data[$key], $attachments_data_override[$key]); } } } return $posts_data; }