' . wp_kses_post( $temperas['tempera_excerptcont'] ) . '

'; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and tempera_excerpt_continuereading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * * @since tempera 0.5 * @return string An ellipsis */ function tempera_excerpt_dots( $more ) { global $temperas; return wp_kses_post( $temperas['tempera_excerptdots'] ); } add_filter( 'excerpt_more', 'tempera_excerpt_dots' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. * * @since tempera 0.5 * @return string Excerpt with a pretty "Continue Reading" link */ function tempera_excerpt_morelink( $output ) { if ( ! is_attachment() ) { $output .= tempera_excerpt_continuereading_link(); } return $output; } add_filter( 'get_the_excerpt', 'tempera_excerpt_morelink', 20 ); /** * Adds a "Continue Reading" link to post excerpts created using the tag. * * To override this link in a child theme, remove the filter and add your own * function tied to the the_content_more_link filter hook. * * @since tempera 0.5 * @return string Excerpt with a pretty "Continue Reading" link */ function tempera_more_link($more_link, $more_link_text) { global $temperas; $new_link_text = wp_kses_post( $temperas['tempera_excerptcont'] ); if (preg_match("/custom=(.*)/",$more_link_text,$m) ) { $new_link_text = $m[1]; }; $more_link = str_replace($more_link_text, $new_link_text . '', $more_link); $more_link = str_replace('more-link', 'continue-reading-link', $more_link); return $more_link; } add_filter('the_content_more_link', 'tempera_more_link', 10, 2); /** * Allows post excerpts to contain HTML tags * @since tempera 1.8.7 * @return string Excerpt with most HTML tags intact */ function tempera_excerpt_html($text) { global $temperas; $temperas['tempera_excerptwords'] = absint( $temperas['tempera_excerptwords'] ); $temperas['tempera_excerptcont'] = wp_kses_post( $temperas['tempera_excerptcont'] ); $temperas['tempera_excerptdots'] = wp_kses_post( $temperas['tempera_excerptdots'] ); $raw_excerpt = $text; if ( '' == $text ) { //Retrieve the post content. $text = get_the_content(''); //Delete all shortcode tags from the content. $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $allowed_tags = ',,,,