function theme_twitter_account_list_form in Twitter 7.5
Same name and namespace in other branches
- 6.5 twitter.pages.inc \theme_twitter_account_list_form()
- 6.2 twitter.pages.inc \theme_twitter_account_list_form()
- 6.3 twitter.pages.inc \theme_twitter_account_list_form()
- 6.4 twitter.pages.inc \theme_twitter_account_list_form()
- 7.6 twitter.pages.inc \theme_twitter_account_list_form()
- 7.3 twitter.pages.inc \theme_twitter_account_list_form()
- 7.4 twitter.pages.inc \theme_twitter_account_list_form()
Themes the list of Twitter accounts.
File
- ./
twitter.pages.inc, line 297 - Page callbacks for Twitter module.
Code
function theme_twitter_account_list_form($variables) {
$form = $variables['form'];
$header = array(
'',
t('Name'),
t('Description'),
);
if (user_access('administer twitter accounts')) {
$header[] = t('Added by');
}
$header = array_merge($header, array(
t('Auth'),
t('Private'),
t('Tweets'),
t('Mentions'),
t('Global'),
t('Delete'),
));
$rows = array();
foreach (element_children($form['accounts']) as $key) {
$element =& $form['accounts'][$key];
$row = array(
drupal_render($element['image']),
drupal_render($element['id']) . drupal_render($element['screen_name']) . drupal_render($element['visible_name']),
drupal_render($element['description']),
);
if (user_access('administer twitter accounts')) {
$row[] = drupal_render($element['user']);
}
$row = array_merge($row, array(
drupal_render($element['auth']),
drupal_render($element['protected']),
drupal_render($element['import']),
drupal_render($element['mentions']),
drupal_render($element['is_global']),
drupal_render($element['delete']),
));
$rows[] = $row;
}
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
$output .= drupal_render_children($form);
return $output;
}