WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
257 | * @internal |
258 | * Filter tag is basically: filter 'type' 'hook_name' 'description' |
259 | * |
260 | * Takes two parameters the term Object and the taxonomy name. Must return term object. |
261 | * $taxonomy will be the taxonomy name, so for example, if 'category', it would be 'get_category' |
262 | * as the filter name. |
263 | * Useful for custom taxonomies or plugging into default taxonomies. |
264 | * @filter object get_$taxonomy Used in @see get_term() as specific filter for each $taxonomy. |
265 | */ |
266 | $_term = apply_filters("get_$taxonomy", $_term, $taxonomy); |
267 | $_term = sanitize_term($_term, $taxonomy, $filter); |
268 |
|
269 | if ( $output == OBJECT ) { |
270 | return $_term; |
271 | } elseif ( $output == ARRAY_A ) { |
272 | return get_object_vars($_term); |
273 | } elseif ( $output == ARRAY_N ) { |
274 | return array_values(get_object_vars($_term)); |
275 | } else { |