Viewing 2 replies - 1 through 2 (of 2 total)
  • Part of the function’s description(on the codex page you linked to)..

    This function is identical to do_action, but the arguments passed to the functions hooked to $tag are supplied using an array.

    There’s an example on the do_action page.
    http://codex.wordpress.org/Function_Reference/do_action

    I have just tried do_action_ref_array(). It doesn’t work. It still passes the array by value, not reference.

    @moderator,, Passing by reference allows the each hook to modify the array and pass those alterations to the next hook. The current method, passing by value, does not propagate the changes to the array. They remain in scope to the hook only.

    To work around the issue, make the array global.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘do_action_ref_array’ is closed to new replies.