﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
4679,the_content() vs. the_excerpt() - apply different filters to posts without excerpt text specified,fuggi,fuggi,"There is a problem with the way that WP handles the excerpt for posts, that do not have a excerpt text specified. 

In this case WP applies the wp_trim_excerpt function via default filter which takes the posts content (get_the_content), applies the_content filters and then removes HTML etc. 

So this means, that those excerpts will always have the filters for the_content applied and there is now way to prevent it from doing that to have different filters for the_content and the_excerpt (except from writing an excerpt of course).

It would make more sense if WP would not apply the filters for the_content in this case, so that plugin developers have the possibility to apply an other filter to the posts when displayed in the excerpt than when displayed as post. Plugin designers who want to add their action to both content and excerpt (if no own excerpt is written) should have the possibility to add a filter to get_the_content instead. 

My plugin WP-Simpleviewer adds a Flash based gallery posts - and when these posts are viewed with the_excerpt() they show up with some javascript/html looking content, however I would like to show something like ""Read the whole post to see the gallery"". 

So IMHO what has to be done is to add the possibility to add filters to get_the_content (according to the codex this does not work yet) and to remove the commented line from function wp_trim_excerpt(formatting.php):
                   
{{{
$text = get_the_content('');
//$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]&gt;', $text);
}}}

",enhancement,closed,normal,,Formatting,2.2.1,normal,worksforme,,
