Prev |  | Next

### 3.5.7. pm_send_init

(Phorum 5 >= 5.2.15)

This hook can be used for doing modifications to the PM message data that is used for sending a PM at an early stage in the request.

Call time:

At the start of "send" page handling, after the code that sets up the message values on the first request.

Hook input:

Two arguments: the private message data array and the action that is being handled (one of NULL (initial request), rpct_add, preview, posting).

Hook output:

The private message data, possibly modified.

Example code:

    function phorum_mod_foo_pm_send_init($message, $action)
    {
        // Enable "keep copy" option by default.
        if ($action === NULL) {
            $message['keep'] = 1;
        }

        return $message;
    }

Prev | Up | Next
| Home |