corbosman
2014-05-03 04089eed1cffb4fb9fe9455a8c56ed6fa2155395
add preferences_section_header hook
2 files modified
11 ■■■■■ changed files
program/steps/settings/edit_prefs.inc 4 ●●●● patch | view | raw | blame | history
program/steps/settings/func.inc 7 ●●●●● patch | view | raw | blame | history
program/steps/settings/edit_prefs.inc
@@ -51,6 +51,10 @@
    $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) {
        if (!empty($block['options'])) {
            $table = new html_table(array('cols' => 2));
program/steps/settings/func.inc
@@ -1238,6 +1238,13 @@
            $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']);
}