/** * Testimonial renderer. * */ public static function render_testimonial($post_id = null) { global $post; if (null != $post_id) { $post_backup = $post; $post = get_post($post_id); setup_postdata($post); } else { $post_id = get_the_ID(); } if (!$post_id) { return ''; } $html = ''; // get avatar ( featured image ) $avatar = '<span class="alignleft no-avatar"></span>'; if (has_post_thumbnail($post_id)) { $thumb_id = get_post_thumbnail_id($post_id); $avatar = dt_get_thumb_img(array('img_meta' => wp_get_attachment_image_src($thumb_id, 'full'), 'img_id' => $thumb_id, 'options' => array('w' => 60, 'h' => 60), 'echo' => false, 'wrap' => '<img %IMG_CLASS% %SRC% %SIZE% %IMG_TITLE% %ALT% />')); $avatar = '<span class="alignleft">' . $avatar . '</span>'; } // get link $link = get_post_meta($post_id, '_dt_testimonial_options_link', true); if ($link) { $link = esc_url($link); $avatar = '<a href="' . $link . '" class="rollover" target="_blank">' . $avatar . '</a>'; } else { $link = ''; } // get position $position = get_post_meta($post_id, '_dt_testimonial_options_position', true); if ($position) { $position = '<span class="text-secondary color-secondary">' . $position . '</span>'; } else { $position = ''; } // get title $title = get_the_title(); if ($title) { if ($link) { $title = '<a href="' . $link . '" class="text-primary" target="_blank"><span>' . $title . '</span></a>'; } else { $title = '<span class="text-primary">' . $title . '</span>'; } $title .= '<br />'; } else { $title = ''; } $details_link = ''; if (get_post_meta($post_id, '_dt_testimonial_options_go_to_single', true)) { $details_link = ' ' . presscore_post_details_link(null, array('more-link'), __('read more', LANGUAGE_ZONE)); } $content = apply_filters('the_content', get_the_content() . $details_link); // get it all togeather $html = sprintf('<article>' . "\n\t" . '<div class="testimonial-content">%1$s</div>' . "\n\t" . '<div class="testimonial-vcard"><div class="wf-td">%2$s</div><div class="wf-td">%3$s</div></div>' . "\n" . '</article>' . "\n", $content, $avatar, $title . $position); if (!empty($post_backup)) { $post = $post_backup; setup_postdata($post); } return $html; }
<article <?php post_class(); ?> > <div class="format-aside-content"> <?php the_content(); ?> </div> <?php echo presscore_get_post_meta_wrap(presscore_get_blog_post_date(), 'post-format'); ?> <?php echo presscore_post_details_link(); ?> <?php echo presscore_post_edit_link(); ?> </article><!-- #post-<?php the_ID(); ?> --> <?php do_action('presscore_after_post');
/** * PressCore post Details and Edit buttons in <p> tag. */ function presscore_post_buttons() { echo presscore_post_details_link() . presscore_post_edit_link(); }
} } else { $slider_classes = array('alignnone'); if ('grid' == $config->get('layout')) { $slider_classes[] = 'slider-simple'; } else { $slider_classes[] = 'slider-masonry'; } echo presscore_get_project_media_slider($slider_classes); } } // create post buttons set $post_buttons = ''; if ($show_post_buttons) { if ($desc_on_hover) { $post_buttons .= presscore_post_details_link($post->ID, 'project-details'); if ($show_links) { $post_buttons .= presscore_get_project_link('project-link'); } if ($show_zoom) { $post_buttons .= $zoom_link; } } else { $post_buttons .= $details_button . ($show_links ? $project_link : '') . ($show_zoom ? $zoom_link : ''); } if (1 == $buttonts_count) { $post_buttons = str_replace('class="', 'class="big-link ', $post_buttons); } } if ($show_content && $desc_on_hover) { $post_buttons .= presscore_post_edit_link();
/** * @return string */ function presscore_project_get_preview_content() { $config = presscore_config(); $html = ''; // title if ($config->get('show_titles') && ($title = get_the_title())) { $html .= sprintf('<h3 class="entry-title"><a href="%s" title="%s" rel="bookmark">%s</a></h3>', get_permalink(), the_title_attribute('echo=0'), $title); } // description if ($config->get('show_excerpts')) { $html .= apply_filters('the_excerpt', get_the_excerpt()); } // details button if ($config->get('post.preview.buttons.details.enabled')) { $html .= '<p>' . presscore_post_details_link() . '</p>'; } // post meta $html .= presscore_get_posted_on(); // edit link if ($html) { $html .= presscore_post_edit_link(); } return $html; }
?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php } ?> <?php if ($config->get('show_excerpts')) { ?> <?php the_excerpt(); ?> <?php } ?> <?php if ($config->get('post.preview.buttons.details.enabled')) { echo '<p>' . presscore_post_details_link() . '</p>'; } echo presscore_new_posted_on('dt_portfolio'); echo presscore_post_edit_link(); ?> </div>
?> " rel="bookmark"><?php the_title(); ?> </a></h2> <?php } ?> <?php if ($config->get('show_excerpts')) { ?> <?php the_excerpt(); ?> <?php } ?> <?php if ($config->get('post.preview.buttons.details.enabled')) { echo '<p>' . presscore_post_details_link(get_the_ID(), 'details more-link', __('View details', LANGUAGE_ZONE)) . '</p>'; } echo presscore_new_posted_on('dt_portfolio'); echo presscore_post_edit_link(); ?> </div>