The What
Description
It does two different tasks:
- If you don’t pass in your callback name, then it checks if any callbacks are registered to the specified event.
- Else, it checks if the callback (your function, method, or closure) is registered to a specific filter hook event.
Parameters
event_name
- The name of the event (filter hook) you want to check.
callback_name
- The fully qualified name of your callback.
Return Values
It returns:
- If you pass in a callback, then it returns the priority number for your callback if it is registered; else you’ll get a
FALSE
back. - Otherwise, it turns
TRUE
if there are callbacks are registered; elseFALSE
is returned.
When was the last time you got out of your chair and stretched? Just saying…
More coming soon…keep checking back.
PHP Constructs
These are the PHP constructs used in WordPress Core for has_filter
: