function theme_modr8_form in modr8 6
Same name and namespace in other branches
- 5 modr8_admin.inc \theme_modr8_form()
- 7 modr8_admin.inc \theme_modr8_form()
Themes the content moderation form.
1 theme call to theme_modr8_form()
File
- ./
modr8_admin.inc, line 299
Code
function theme_modr8_form($form) {
$headers = array(
t('Operations'),
t('Content'),
);
foreach (element_children($form) as $key) {
// Only do this for nodes; not the submit button.
if (is_numeric($key)) {
$row = array();
$note_field = '';
if (variable_get('modr8_send_approve', FALSE) || variable_get('modr8_send_deny', FALSE)) {
$note_field .= drupal_render($form[$key]['note']);
}
$row[] = array(
'data' => drupal_render($form[$key]['ops']) . $note_field,
'style' => 'vertical-align:top;',
);
// Apply extra filtering to insure we don't have nested form elements,
// unexpected script, etc.
$preview = filter_xss_admin($form[$key]['preview']['#value']);
if (!empty($form[$key]['log_link']['#value'])) {
$preview .= '<div><em>' . drupal_render($form[$key]['log_link']) . '</em></div>';
}
$row[] = array(
'data' => $preview,
'style' => 'vertical-align:top;',
);
$rows[] = $row;
}
}
$output = theme('table', $headers, $rows);
$output .= drupal_render($form);
return $output;
}