<tag>
Hooks a function on to a specific action.
Description
Parameters (1)
- 0. $args (unknown)
- The args.
Usage
- To run the hook, copy the example below.
- $args = apply_filters( '{$tag}', $args );
- if ( !empty( $args ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the <tag> callback
- function filter_tag( $args ) {
- // make filter magic happen here...
- return $args;
- };
- // add the filter
- add_filter( "{$tag}", 'filter_tag', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "{$tag}", 'filter_tag', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/plugin.php
- return apply_filters_ref_array( $tag, $args );