WP_Hook::has_filter

SummerySummery

Checks if a specific action has been registered for this hook.

Syntax

WP_Hook::has_filter( string $tag = '', callable|bool $function_to_check = false )

ParametersParameters

$tag

(string) (Optional) The name of the filter hook.

Default value: ''

$function_to_check

(callable|bool) (Optional) The callback to check for.

Default value: false

ReturnReturn

(bool|int) The priority of that hook is returned, or false if the function is not attached.

SourceSource

File: wp-includes/class-wp-hook.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top