[wp-hackers] Detecting which action ran function

John Blackbourn johnbillion+wp at gmail.com
Fri Aug 12 15:16:57 UTC 2011

On 12 August 2011 15:36, Robert Lusby <nanogwp at gmail.com> wrote:
> I have a function that is called from a number of different actions.
> The function does essentially the same, except for one small difference on
> output depending which action triggered it.
> How do you detect which WP action has called the function?

The function you're looking for is current_filter().

More information about the wp-hackers mailing list