?> </div> <div class="wrapper-prices"> </div><!-- .wrapper-prices --> <?php if (function_exists('tcp_is_saleable') && tcp_is_saleable($post_id)) { ?> <?php if (!get_option('bre_carousel_hide_more_details', false)) { ?> <a href="<?php echo tcp_get_permalink($post_id); ?> " class="btn btn-large btn-primary"> <?php echo tcp_get_the_price_label($post_id); ?> </a> <?php if (function_exists('tcp_has_discounts')) { ?> <?php if (tcp_has_discounts()) { ?> <span class="loop-discount">-<?php tcp_the_discount_value(); ?>
/** * Returns the excerpt of the given post * @since 1.5.8 */ function bre_the_excerpt($post_id = 0, $length = 0) { // Max excerpt length. Length is set in characters if ($post_id == 0) { $post_id = get_the_ID(); } $post = get_post($post_id); $text = $post->post_excerpt; $text = apply_filters('the_excerpt', $text); $see_points = false; if (strlen($text) == 0) { $text = bre_get_the_content($post_id); $text = strip_tags($text, '<p><br><style>'); // use ' $text = strip_tags($text,'<p><a>'); ' if you want to keep some tags $see_points = true; } $text = strip_shortcodes($text); // optional, recommended // if ( $length > 0 ) $text = substr( $text, 0, $length ); if ($length > 0) { $initial_length = strlen($text); $text = explode(' ', $text); array_splice($text, $length); $text = implode(' ', $text); $see_points = $initial_length > strlen($text); } if ($see_points && strlen($text)) { if (function_exists('tcp_get_permalink')) { $permalink = tcp_get_permalink($post_id); } else { $permalink = get_permalink($post_id); } $text .= sprintf(' <a href="%s">[...]</a>', $permalink); } echo $text; }