Opened 20 years ago
Closed 19 years ago
#1007 closed defect (bug) (worksforme)
do_action & arguments
Reported by: | dasher | Owned by: | skippy |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | General | Keywords: | bg|2nd-opinion |
Focuses: | Cc: |
Description
do_action doesn't accept arguments by ref and the newly created args array isn't returned - which makes it hard for hooks to modify arguments or change passed arguments.
It'd be useful if something like the following was possible:
$args = array('varA'=>$varA);
do_action('some-action', &$args);
$varA = $argsvarA?;
Change History (4)
Note: See
TracTickets for help on using
tickets.
To do call time pass by reference you have to use the array trick.
Example:
do_action('generate_rewrite_rules', array(&$this));