+2 votes
in Wordpress by
I'm doing some self study on frameworks and cons packages. Trying to build a feature rich list to finally build and bundle my own product package. Looking over the function in WordPress, apply_filters(...), can't get my head around what it actually does.

Can someone shed some light to clear this up for me please. A few examples would be helpful if possible.

1 Answer

0 votes
The apply_filters() 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. The callback functions attached to filter hook $tag are invoked by calling this function.

$value = apply_filters( $tag, $value, $var_1, $var_2, $var_3, ... );

You can use apply_filters to filter a given $value - with relation to the value itself and optionally provided variables inside the range $var_1 to $var_n.

Please refer here for more official info on this.

Related questions

0 votes
1 answer 3.2k views
0 votes
0 answers 2.1k views
+2 votes
2 answers 6.7k views
0 votes
1 answer 481 views
asked Aug 25, 2016 in Wordpress by Sita
0 votes
1 answer 854 views
+1 vote
1 answer 669 views