Checks to see if a filter is currently being applied.
<?php doing_filter($filter); ?>
To check whether the 'posts_results' filter is being applied you could write something similar to this:
if(doing_filter('posts_results')){
//Do Something Here
}
To check if any filter is being applied you could write something like this:
if(doing_filter()){
//Do Something Here
}
doing_filter() is located in wp-includes/plugin.php
Filters: add_filter(), current_filter(), has_filter(), apply_filters(), remove_filter()
Category:Functions