do_action_ref_array [ WordPress Function ]
do_action_ref_array ( $tag, $args )
| Parameters: |
|
| See: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: do_action, _set_cron_array, _get_cron_array, do_core_upgrade, _upgrade_cron_array
Execute functions hooked on a specific action hook, specifying arguments in an array.
Source
<?php
function do_action_ref_array($tag, $args) {
global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
if ( ! isset($wp_actions) )
$wp_actions = array();
if ( ! isset($wp_actions[$tag]) )
$wp_actions[$tag] = 1;
else
++$wp_actions[$tag];
// Do 'all' actions first
if ( isset($wp_filter['all']) ) {
$wp_current_filter[] = $tag;
$all_args = func_get_args();
_wp_call_all_hook($all_args);
}
if ( !isset($wp_filter[$tag]) ) {
if ( isset($wp_filter['all']) )
array_pop($wp_current_filter);
return;
}
if ( !isset($wp_filter['all']) )
$wp_current_filter[] = $tag;
// Sort
if ( !isset( $merged_filters[ $tag ] ) ) {
ksort($wp_filter[$tag]);
$merged_filters[ $tag ] = true;
}
reset( $wp_filter[ $tag ] );
do {
foreach( (array) current($wp_filter[$tag]) as $the_ )
if ( !is_null($the_['function']) )
call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
} while ( next($wp_filter[$tag]) !== false );
array_pop($wp_current_filter);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/do action ref array « WordPress Codex
Description. Execute functions hooked on a specific action hook, specifying arguments in an array. This function is identical to do_action, but the arguments ...
codex.wordpress.org - WordPress › Support » do_action_ref_array
I'm trying to use this hook do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) ); but I'm not having much luck getting it to work.
wordpress.org - do_action_ref_array() WordPress function reference, arguments and ...
Execute functions hooked on a specific action hook, specifying arguments in an array.
queryposts.com - do_action_ref_array | A HitchHackers guide through WordPress
Feb 11, 2011 ... function do_action_ref_array($tag, $args) { global $wp_filter, $wp_actions, $ merged_filters, $wp_current_filter; if ( ! isset($wp_actions) ) ...
hitchhackerguide.com