Codex

Function Reference/apply filters

Contents

Description

Call the functions added to a filter hook. See the Plugin API for a list of filter hooks.

The callback functions attached to filter hook $tag are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter.

Usage

 <?php apply_filters($tag$value); ?> 

Parameters

$tag
(string) (required) The name of the filter hook.
Default: None
$value
(mixed) (required) The value which the filters hooked to $tag may modify.
Default: None

Return

(mixed) The result of $value after all hooked functions are applied to it.

Note: The type of return should be the same as the type of $value: a string or an array, for example.