<?php

/**
 * Generates date+comments+author
 * @requires $excerpt_length
 */
/* Get upload directory info*/
$upload_info = wp_upload_dir();
$upload_dir = $upload_info['basedir'];
$upload_url = $upload_info['baseurl'];
if (!isset($excerpt_length)) {
    $excerpt_length = 11;
}
//might not be set when large excerpt is used
/*Get file path info*/
$attachment_id = get_post_thumbnail_id(get_the_ID());
$image_path = get_attached_file($attachment_id);
$item_string .= '
<div class="share-outer component-element">
    <div class="social-share-boxes share-boxes featured-posts-grid-paragraph">
        <div class="absolute-container">
            <i class="fa fa-share-alt start-icon background-accent share"></i><span class="share-label small-italic">' . __('Share This ', 'thshpr') . '</span><!--
             --><span class="social-box facebook"><a class="inner facebook-inner" href="https://www.facebook.com/sharer/sharer.php?u=' . urlencode(get_permalink()) . '"><i class="fa fa-facebook icon"></i></a></span><!--
             --><span class="social-box twitter"><a class="inner twitter-inner" href="https://twitter.com/home?status=' . urlencode(get_permalink()) . '"><i class="fa fa-twitter icon"></i></a></span><!--
             --><span class="social-box google-plus"><a class="inner google-plus-inner" href="https://plus.google.com/share?url=' . urlencode(get_permalink()) . '"><i class="fa fa-google-plus icon"></i></a></span><!--
             --><span class="social-box linked-in"><a class="inner linked-in-inner" href="https://www.linkedin.com/shareArticle?mini=true&url=' . urlencode(get_permalink()) . '&title=' . urlencode(get_the_title()) . '&summary=' . thshpr_stripped_excerpt($excerpt_length) . '&source="><i class="fa fa-linkedin icon"></i></a></span><!--
             --><span class="social-box pinterest"><a class="inner pinterest-inner" href="https://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink()) . '&media=' . urlencode($image_path) . '&description=' . thshpr_stripped_excerpt($excerpt_length) . '"><i class="fa fa-pinterest icon"></i></a></span>
        </div>
    </div>
</div>';
<?php

/**
 * Generates title+excerpt for post sliders
 * @requires $hidden_thumb - a small thumbnail string showing the next or prev post
 */
if (!isset($cell_class)) {
    $cell_class = "";
}
if ($cell_class == "focus") {
    $item_string .= '<div class="component-element meta-title"><h3 class="large-h3"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3></div><div class="meta-excerpt large-excerpt component-element"><a href="' . get_permalink() . '" >' . thshpr_stripped_excerpt($excerpt_length) . '</a></div><div class="hidden-thumb">' . $hidden_thumb . '</div><span class="hidden-desc">' . get_the_title() . '</span>';
} else {
    $item_string .= '<div class="component-element meta-title"><h5><a href="' . get_permalink() . '">' . get_the_title() . '</a></h5></div><div class="meta-excerpt small-excerpt component-element"><a href="' . get_permalink() . '" >' . thshpr_stripped_excerpt($excerpt_length) . '</a></div><div class="hidden-thumb">' . $hidden_thumb . '</div><span class="hidden-desc">' . get_the_title() . '</span>';
}
Example #3
0
<?php

/**
 * Generates excerpt
 * @requires $cell_class - type of cell, focus = large
 */
if ($cell_class == "focus") {
    $item_string .= '<div class="meta-excerpt large-excerpt component-element"><a href="' . get_permalink() . '">' . thshpr_stripped_excerpt($large_excerpt_length) . '</a></div>';
} else {
    $item_string .= '<div class="meta-excerpt small-excerpt component-element"><a href="' . get_permalink() . '" >' . thshpr_stripped_excerpt($excerpt_length) . '</a></div>';
}