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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
444 |
|
445 | $args = array(); |
446 | if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this) |
447 | $args[] =& $arg[0]; |
448 | else |
449 | $args[] = $arg; |
450 | for ( $a = 2, $num = func_num_args(); $a < $num; $a++ ) |
451 | $args[] = func_get_arg($a); |
452 |
|
453 | $wp_filter[ $tag ]->do_action( $args ); |
454 |
|
455 | array_pop($wp_current_filter); |
456 | } |
457 |
|
458 | /** |
459 | * Retrieve the number of times an action is fired. |
460 | * |
461 | * @since 2.1.0 |
462 | * |
Line | Code |
506 | if ( !isset($wp_filter[$tag]) ) { |
507 | if ( isset($wp_filter['all']) ) |
508 | array_pop($wp_current_filter); |
509 | return; |
510 | } |
511 |
|
512 | if ( !isset($wp_filter['all']) ) |
513 | $wp_current_filter[] = $tag; |
514 |
|
515 | $wp_filter[ $tag ]->do_action( $args ); |
516 |
|
517 | array_pop($wp_current_filter); |
518 | } |
519 |
|
520 | /** |
521 | * Check if any action has been registered for a hook. |
522 | * |
523 | * @since 2.5.0 |
524 | * |