I have a filter that's being applied, but I can't find a corresponding call to add_filter()
. Is there any other way it could be added?
Specifically: I'm trying to maintain/make some changes to a Wordpress plugin (privately developed, and the original developer is not available to contact), and for my current change, I've traced the execution path I'm looking at to the call:
$output = apply_filters('<plugin_name>-output-block', $output, $my_args);
However I cannot for the life of me find where the filter is being defined. I've grepped through the plugin's entire codebase for "<plugin_name>-output-block
" and nothing. I've also grepped for every instance of "add_filter
" in case it's being called with the filter name in a variable... and still nothing. As far as I can determine, the filter is never being added.
(I am aware of the functionality where you can use apply_filters()
to simply define a new hook on the fly, but I don't think that's what's happening here (or at least is not the only thing); if I comment out that line, the output definitely breaks... so there's existing functionality behind there that's being called.)
So: is there another way that the filter could be being added? A mechanism other than add_filter()
? Could it be added under a different name and then renamed somewhere? What am I missing?
'<plugin_name>-output-block'
' ?