} } $post_permalink_config = 'href="' . $post_permalink . '" class="link-to-post"'; if ($post_links_match_thumb) { $link_config = sf_post_item_link(); $post_permalink_config = $link_config['config']; } $thumb_type = sf_get_post_meta($post_id, 'sf_thumbnail_type', true); $download_button = sf_get_post_meta($post_id, 'sf_download_button', true); $download_file = sf_get_post_meta($post_id, 'sf_download_file', true); $download_text = apply_filters('sf_post_download_text', __("Download", "swiftframework")); $download_shortcode = sf_get_post_meta($post_id, 'sf_download_shortcode', true); // Media $item_figure = ""; if ($thumb_type != "none") { $item_figure = sf_post_thumbnail('mini', $fullwidth); } ?> <div class="mini-blog-item-wrap clearfix"> <?php if ($post_format == "quote" || $post_format == "link") { ?> <div class="mini-alt-wrap"><!-- OPEN .mini-alt-wrap --> <?php } else { ?> <?php
function sf_get_campaign_item($item_class) { global $post, $sf_has_progress_bar; $sf_has_progress_bar = true; $campaign_item = ""; if (class_exists('ATCF_Campaigns')) { $campaign = new ATCF_Campaign($post->ID); $post_title = get_the_title(); $post_author = get_the_author_link(); $post_date = get_the_date(); $post_date_str = get_the_date('Y-m-d'); $post_categories = get_the_category_list(', '); $post_comments = get_comments_number(); $post_permalink = get_permalink(); $post_excerpt = sf_excerpt(20); $percent = $campaign->percent_completed(); $percent_num = str_replace('%', '', $percent); $campaign_item .= '<li class="campaign-item ' . $item_class . '">'; $campaign_item .= sf_post_thumbnail(); $campaign_item .= '<div class="details-wrap">'; $campaign_item .= '<h3 itemprop="name headline"><a href="' . $post_permalink . '">' . $post_title . '</a></h3>'; $campaign_item .= '<div class="excerpt" itemprop="description">' . $post_excerpt . '</div>'; $campaign_item .= '<div class="campaign-details-mini clearfix">'; $campaign_item .= '<div class="funded-bar progress standard"><div class="bar" data-value="' . $percent_num . '"></div></div>'; $campaign_item .= '<div class="detail">'; $campaign_item .= '<data>' . $percent . '</data>'; $campaign_item .= '<span>' . __("Funded", "swiftframework") . '</span>'; $campaign_item .= '</div>'; $campaign_item .= '<div class="detail pledged">'; $campaign_item .= '<data>' . $campaign->current_amount() . '</data>'; $campaign_item .= '<span>' . __("Pledged", "swiftframework") . '</span>'; $campaign_item .= '</div>'; if (!$campaign->is_endless()) { $campaign_item .= '<div class="detail">'; $campaign_item .= '<data>' . $campaign->days_remaining() . '</data>'; $campaign_item .= '<span>' . _n("Day to Go", "Days to Go", $campaign->days_remaining(), "swiftframework") . '</span>'; $campaign_item .= '</div>'; } $campaign_item .= '</div>'; $campaign_item .= '</div>'; $campaign_item .= '</li>'; } return $campaign_item; }
function sf_get_masonry_post($postID, $thumb_type, $fullwidth, $show_title, $show_excerpt, $show_details, $show_read_more, $content_output, $excerpt_length) { global $sf_options; // Get Post Object $post_object = sf_build_post_object($postID, $content_output, $excerpt_length); // Link config $post_links_match_thumb = false; if (isset($sf_options['post_links_match_thumb'])) { $post_links_match_thumb = $sf_options['post_links_match_thumb']; } $post_permalink_config = 'href="' . $post_object['permalink'] . '" class="link-to-post"'; if ($post_links_match_thumb) { $link_config = sf_post_item_link(); $post_permalink_config = $link_config['config']; } // Variable setup $post_item = ""; // THUMBNAIL MEDIA TYPE SETUP $post_item .= apply_filters('sf_before_masonry_post_thumb', ''); $item_figure = ""; if ($thumb_type != "none") { $item_figure .= sf_post_thumbnail("masonry", $fullwidth); } if ($item_figure != "") { $post_item .= $item_figure; } // Start Output $post_item .= '<div class="details-wrap">'; $post_item .= '<a ' . $post_permalink_config . '></a>'; // Title if ($post_object['type'] == "post") { if ($post_object['format'] == "standard") { $post_item .= '<h6>' . __("Article", "swiftframework") . '</h6>'; } else { $post_item .= '<h6>' . $post_object['format'] . '</h6>'; } } else { $post_item .= '<h6>' . $post_object['type'] . '</h6>'; } if ($show_title == "yes" && $post_object['format'] != "quote" && $post_object['format'] != "link") { $post_item .= '<h2 itemprop="name headline">' . $post_object['title'] . '</h2>'; } else { if ($post_object['format'] == "quote") { $post_item .= '<div class="quote-excerpt" itemprop="name headline">' . $post_object['excerpt'] . '</div>'; } else { if ($post_object['format'] == "link") { $post_item .= '<h3 itemprop="name headline">' . $post_object['title'] . '</h3>'; } } } // Details if ($show_details == "yes") { $post_item .= sf_get_post_details($postID); } // Excerpt if ($show_excerpt == "yes" && $post_object['format'] != "quote") { $post_item .= '<div class="excerpt" itemprop="description">' . $post_object['excerpt'] . '</div>'; } // Read More if ($show_read_more == "yes") { if ($post_object['download_button']) { if ($post_object['download_shortcode'] != "") { $post_item .= do_shortcode($post_object['download_shortcode']); } else { $post_item .= '<a href="' . wp_get_attachment_url($post_object['download_file']) . '" class="download-button read-more-button">' . $post_object['download_text'] . '</a>'; } } $post_item .= '<a class="read-more-button" href="' . $post_object['permalink'] . '">' . __("Read more", "swiftframework") . '</a>'; } // Comments / Likes if ($show_details == "yes") { $post_item .= '<div class="comments-likes">'; if (comments_open()) { $post_item .= '<div class="comments-wrapper"><a href="' . $post_object['permalink'] . '#comment-area"> <svg version="1.1" class="comments-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve"> <path fill="none" class="stroke" stroke="#252525" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" M13.958,24H2.021C1.458,24,1,23.541,1,22.975V2.025C1,1.459,1.458,1,2.021,1h25.957C28.542,1,29,1.459,29,2.025v20.949 C29,23.541,28.542,24,27.979,24H21v5L13.958,24z"/> </svg> <span>' . $post_object['comments'] . '</span></a></div>'; } if (function_exists('lip_love_it_link')) { $post_item .= lip_love_it_link($postID, false); } $post_item .= '</div>'; } // Close Output $post_item .= '</div>'; // Return return $post_item; }
<?php echo sf_post_thumbnail();
} } $post_permalink_config = 'href="' . $post_permalink . '" class="link-to-post"'; if ($post_links_match_thumb) { $link_config = sf_post_item_link(); $post_permalink_config = $link_config['config']; } $thumb_type = sf_get_post_meta($post_id, 'sf_thumbnail_type', true); $download_button = sf_get_post_meta($post_id, 'sf_download_button', true); $download_file = sf_get_post_meta($post_id, 'sf_download_file', true); $download_text = apply_filters('sf_post_download_text', __("Download", "swiftframework")); $download_shortcode = sf_get_post_meta($post_id, 'sf_download_shortcode', true); // Media $item_figure = ""; if ($thumb_type != "none") { $item_figure = sf_post_thumbnail('masonry', $fullwidth); } ?> <?php echo sf_masonry_date_figure_overlay(); ?> <?php if ($item_figure != "") { echo $item_figure; } ?> <div class="details-wrap"> <a <?php
} } $post_permalink_config = 'href="' . $post_permalink . '" class="link-to-post"'; if ($post_links_match_thumb) { $link_config = sf_post_item_link(); $post_permalink_config = $link_config['config']; } $thumb_type = sf_get_post_meta($post_id, 'sf_thumbnail_type', true); $download_button = sf_get_post_meta($post_id, 'sf_download_button', true); $download_file = sf_get_post_meta($post_id, 'sf_download_file', true); $download_text = apply_filters('sf_post_download_text', __("Download", "swiftframework")); $download_shortcode = sf_get_post_meta($post_id, 'sf_download_shortcode', true); // Media $item_figure = ""; if ($thumb_type != "none") { $item_figure = sf_post_thumbnail('standard', $fullwidth); } ?> <?php if ($show_details == "yes") { ?> <?php /* Post Details ================================================== */ ?> <div class="side-details"> <?php