Atahualpa Custom Excerpts

There is a problem with Atahualpa custom excerpts not being processed correctly in category lists or other places where the post excerpt is displayed.  Note, this problem exists in Atahualpa version 3.4.

If you have this problem you will see ellipsis […] and word truncation when you have specified custom excerpts.  When a custom excerpt is provided on the post then the excerpt should be displayed in its entirety, without truncation.


functions.php

Add the identified line to function bfa_wp_trim_excerpt($text) as shown:

// Custom Excerpts
function bfa_wp_trim_excerpt($text) { // Fakes an excerpt if needed

	global $bfa_ata;

	if ( '' == $text ) {
		$text = get_the_content('');
		$text = apply_filters('the_content', $text);
		$text = str_replace(']]>', ']]>', $text);
		$text = strip_tags($text, $bfa_ata['dont_strip_excerpts']);
		$excerpt_length = $bfa_ata['excerpt_length'];
		$words = explode(' ', $text, $excerpt_length + 1);
	} else {
		$words = explode(' ', $text);
		$excerpt_length = count($words);  		// bug fix
	}

	if (count($words) > $excerpt_length) {
		array_pop($words);
		$custom_read_more = str_replace('%permalink%', get_permalink(), $bfa_ata['custom_read_more']);
		$custom_read_more = str_replace('%title%', the_title('','',FALSE), $custom_read_more);
		array_push($words, $custom_read_more);
		$text = implode(' ', $words);
	}

	return $text;
}