In the plugin Taxonomy Listing there is the following function:
$the_post = get_post($post_id); //Gets post ID
$the_excerpt = $the_post->post_content; //Gets post_content to be used as a basis for the excerpt
$excerpt_length = 25; //Sets excerpt length by word count
$the_excerpt = strip_tags(strip_shortcodes($the_excerpt)); //Strips tags and images
$words = explode(‘ ‘, $the_excerpt, $excerpt_length + 1);
if(count($words) > $excerpt_length) :
$the_excerpt = implode(‘ ‘, $words);
$the_excerpt = $the_excerpt;
Note towards the end, $the_excerpt = $the_excerpt. Is there any reason to have such a line? Seems to me it is setting itself to itself, which accomplishes nothing?
Read more here:: Is there any good reason to have $the_excerpt = $the_excerpt?