add preferences_section_header hook

pull/179/head
corbosman 11 years ago
parent 37ac40719f
commit dba1c6f083

@ -51,6 +51,10 @@ function rcmail_user_prefs_form($attrib)
$out = $form_start; $out = $form_start;
if(!empty($SECTIONS[$CURR_SECTION]['header'])) {
$out .= html::div(array('id' => 'preferences-header', 'class' =>'boxcontent'), $SECTIONS[$CURR_SECTION]['header']);
}
foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $class => $block) { foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $class => $block) {
if (!empty($block['options'])) { if (!empty($block['options'])) {
$table = new html_table(array('cols' => 2)); $table = new html_table(array('cols' => 2));

@ -1241,6 +1241,13 @@ function rcmail_user_prefs($current = null)
$sections[$idx]['blocks'] = $data['blocks']; $sections[$idx]['blocks'] = $data['blocks'];
} }
$data = $RCMAIL->plugins->exec_hook('preferences_section_header',
array('section' => $sect['id'], 'header' => '', 'current' => $current));
if(!empty($data['header'])) {
$sections[$idx]['header'] = $data['header'];
}
return array($sections, $plugin['cols']); return array($sections, $plugin['cols']);
} }

Loading…
Cancel
Save