WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/apply filters

Description

Call the functions added to a filter hook.

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</a> parameter.

Usage

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

Parameters

<tt>$tag
(string) (required) The name of the filter hook.
Default: None
$string
(string) (required) The text on which the filters hooked to $tag are applied on.
Default: None
$var
(mixed) (required) Additional variables to pass to the functions hooked to $tag.
Default: None

Return

(string) The text in $string after all hooked functions are applied to it.