Merge pull request #122 from JohnDoh/render_response

Add a render_response hook, similar to render_page hook.
pull/123/head
Aleksander Machniak 11 years ago
commit 69bcf65b9b

@ -227,6 +227,13 @@ class rcmail_output_json extends rcmail_output
if (!empty($this->callbacks))
$response['callbacks'] = $this->callbacks;
// trigger generic hook where plugins can put additional content to the response
$hook = $this->app->plugins->exec_hook("render_response", array('response' => $response));
// save some memory
$response = $hook['response'];
unset($hook['response']);
echo self::json_serialize($response);
}

Loading…
Cancel
Save