Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

apply_filters()

3 tags 1 category

apply_filters() — Calls the callback functions that have been added to a filter hook. This function invokes all functions attached to filter hook $hook_name. It is possible to create new filter hooks by simply calling this function, specifying the name of the new hook using the $hook_name parameter. The function also allows for multiple additional arguments to be passed to hooks. Example usage: // The filter callback function. function example_callback( $string, $arg1, $arg2 ) { // (maybe) modify $string. return $string; } add_filter( ‘example_filter’, ‘example_callback’, 10, 3 ); /* Apply the filters by calling the ‘example_callback()’ function that’s hooked onto example_filter above. * – ‘example_filter’ is the filter hook.

Inputs: $hook_name (string): The name of the filter hook. $value (mixed): The value to filter.

Returns mixed: The filtered value after all hooked functions are applied to it.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…