﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
18037,inconsistency in filters for the_content and the_excerpt,opajaap,,"My plugin replaces a keytext by a div tag using a filter:
add_filter('the_content', 'my_proc');

This filter appears also to be run in an excerpt, while my div is stripped in the excerpt. 
When my div is stripped i want - instead of that div - to print a notification like - Here belongs my div -.

So, either i need a boolean variable or function that tells me that my filter is currently run by a call to the_excerpt(), OR the filter should not be run on the excerpt if it is not added to the excerpts filter list.

I tried a workaround by adding a new filter to the_excerpt and setting my own global to indicate i am in an excerpt, but unfortunately this filter is run after the the_content filter, despite fiddling with filter priorities. So, in a list (archive) the first excerpt is still in error. 

The documentation says about filters:


the_content
    applied to the post content retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).

and

the_excerpt
    applied to the post excerpt (or post content, if there is no excerpt) retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).


It appears that not only the_excerpt filters are run on the content if there is no excerpt, what is fine, but it works '''also the other way around:''' the the_content filters are run on the excerpt. This is an inconsistency, and basically my problem.",enhancement,new,normal,Awaiting Review,Plugins,3.2,normal,,,
