Checks if any filter has been registered for a hook.
Description
When using the $callback argument, this function may return a non-boolean value that evaluates to false (e.g. 0), so use the === operator for testing the return value.
Parameters
$hook_namestring
The name of the filter hook.
$callbackcallable|string|array|falseoptional
The callback to check for. This function can be called unconditionally to speculatively check a callback that may or may not exist. Default false.Default: false
$priorityint|falseoptional
The specific priority at which to check for the callback. Default false.Default: false
Return
bool|int
If $callback is omitted, returns boolean for whether the hook has anything registered. When checking a specific function, the priority of that hook is returned, or false if the function is not attached. If $callback and $priority are both provided, a boolean is returned for whether the specific function is registered at that priority.
_restore_wpautop_hook()If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards, for subsequent `the_content` usage.
Signature, return type and hooks compared across 5 parsed releases.
6.9.7
Parameter $priority added.verified against source
6.9.0
Added the $priority parameter.from the docblock
2.5.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/plugin.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.