Function Reference/has filter
Description
Check if any filter has been registered for a hook.
Usage
<?php has_filter( $tag, $function_to_check ); ?>
Parameters
- $tag
- (string) (required) The name of the filter hook.
- Default: None
- $function_to_check
- (callback) (optional) If specified, return the priority of that function on this hook or false if not attached.
- Default: False
Return
- int|boolean
- Optionally returns the priority on that hook for the specified function.
Examples
Notes
- Uses: global array
$wp_filter that stores all of the filters
Change Log
Source File
has_filter() is located in wp-includes/plugin.php.
Related
Filters:
has_filter(),
add_filter(),
apply_filters(),
current_filter(),
merge_filters(),
remove_filter(),
remove_all_filters()