Add plugin hook before the final HTML content of a page is sent

release-0.6
thomascube 14 years ago
parent 4d982d38a8
commit 798764c2bb

@ -275,10 +275,14 @@ class rcube_html_page
array($this, 'file_callback'), $output);
$output = str_replace('$__skin_path', $base_path, $output);
// trigger hook with final HTML content to be sent
$hook = rcmail::get_instance()->plugins->exec_hook("send_page", array('content' => $output));
if (!$hook['abort']) {
if ($this->charset != RCMAIL_CHARSET)
echo rcube_charset_convert($output, RCMAIL_CHARSET, $this->charset);
echo rcube_charset_convert($hook['content'], RCMAIL_CHARSET, $this->charset);
else
echo $output;
echo $hook['content'];
}
}
/**

Loading…
Cancel
Save