Opened 22 years ago
Closed 21 years ago
#1007 closed defect (bug) (worksforme)
do_action & arguments
| Reported by: | dasher | Owned by: | skippy |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | minor | Keywords: | bg|2nd-opinion |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
To do call time pass by reference you have to use the array trick.
Example:
do_action('generate_rewrite_rules', array(&$this));