Ticket #14881: 14881.diff
| File 14881.diff, 1.0 KB (added by nacin, 3 years ago) |
|---|
-
wp-includes/plugin.php
349 349 * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. 350 350 * @return null Will return null if $tag does not exist in $wp_filter array 351 351 */ 352 function do_action($tag , $arg = '') {352 function do_action($tag) { 353 353 global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter; 354 354 355 355 if ( ! isset($wp_actions) ) … … 374 374 } 375 375 376 376 $args = array(); 377 if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this) 378 $args[] =& $arg[0]; 379 else 380 $args[] = $arg; 377 if ( func_num_args() > 1 ) { 378 $arg = func_get_arg(1); 379 if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this) 380 $args[] =& $arg[0]; 381 else 382 $args[] = $arg; 383 } 381 384 for ( $a = 2; $a < func_num_args(); $a++ ) 382 385 $args[] = func_get_arg($a); 383 386
