function theme_captcha_admin_settings_captcha_points in CAPTCHA 7
Same name and namespace in other branches
- 5.3 captcha.module \theme_captcha_admin_settings_captcha_points()
- 6.2 captcha.admin.inc \theme_captcha_admin_settings_captcha_points()
- 6 captcha.admin.inc \theme_captcha_admin_settings_captcha_points()
Custom theme function for a table of (form_id -> CAPTCHA type) settings.
1 theme call to theme_captcha_admin_settings_captcha_points()
- captcha_admin_settings in ./
captcha.admin.inc - Form builder function for the general CAPTCHA configuration.
File
- ./
captcha.admin.inc, line 275 - Functionality and helper functions for CAPTCHA administration.
Code
function theme_captcha_admin_settings_captcha_points($variables) {
$form = $variables['form'];
$header = array(
'form_id',
t('Challenge type'),
t('Operations'),
);
$rows = array();
// Existing CAPTCHA points.
foreach (element_children($form['captcha_captcha_points']) as $key) {
$row = array();
$row[] = drupal_render($form['captcha_captcha_points'][$key]['form_id']);
$row[] = drupal_render($form['captcha_captcha_points'][$key]['captcha_type']);
$row[] = drupal_render($form['captcha_captcha_points'][$key]['operations']);
$rows[] = $row;
}
// For new CAPTCHA point.
$row = array();
$row[] = drupal_render($form['captcha_new_captcha_point']['form_id']);
$row[] = drupal_render($form['captcha_new_captcha_point']['captcha_type']);
$row[] = '';
$rows[] = $row;
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
return $output;
}