' . wp_kses_post( $nirvana_excerptcont ) . '

'; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and nirvana_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * * @since nirvana 0.5 * @return string An ellipsis */ function nirvana_auto_excerpt_more( $more ) { global $nirvana_excerptdots; return wp_kses_post( $nirvana_excerptdots ); } add_filter( 'excerpt_more', 'nirvana_auto_excerpt_more' ); /** * 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 nirvana 0.5 * @return string Excerpt with a pretty "Continue Reading" link */ function nirvana_more_link($more_link, $more_link_text) { global $nirvana_excerptcont; $new_link_text = $nirvana_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', 'nirvana_more_link',10,2); /** * Allows post excerpts to contain HTML tags * @since nirvana 1.8.7 * @return string Excerpt with most HTML tags intact */ function nirvana_trim_excerpt($text) { global $nirvana_excerptlength; global $nirvana_excerptcont; global $nirvana_excerptdots; $nirvana_excerptlength = absint( $nirvana_excerptlength ); $nirvana_excerptcont = wp_kses_post( $nirvana_excerptcont ); $nirvana_excerptdots = wp_kses_post( $nirvana_excerptdots ); $raw_excerpt = $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 = ',,,,