Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$args}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
456      if ( is_array( $arg ) && 1 == count( $arg ) && isset( $arg[0] ) && is_object( $arg[0] ) ) { // array(&$this)
457           $args[] =& $arg[0];
458      } else {
459           $args[] = $arg;
460      }
461      for ( $a = 2, $num = func_num_args(); $a < $num; $a++ ) {
462           $args[] = func_get_arg( $a );
463      }
464
465      $wp_filter[ $tag ]->do_action( $args );
466
467      array_pop( $wp_current_filter );
468 }
469
470 /**
471  * Retrieve the number of times an action is fired.
472  *
473  * @since 2.1.0
474  *
 
Line Code
522                array_pop( $wp_current_filter );
523           }
524           return;
525      }
526
527      if ( ! isset( $wp_filter['all'] ) ) {
528           $wp_current_filter[] = $tag;
529      }
530
531      $wp_filter[ $tag ]->do_action( $args );
532
533      array_pop( $wp_current_filter );
534 }
535
536 /**
537  * Check if any action has been registered for a hook.
538  *
539  * @since 2.5.0
540  *