function theme_twitter_account_list_form in Twitter 6.4
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()
- 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()
- 7.5 twitter.pages.inc \theme_twitter_account_list_form()
Themes the list of Twitter accounts.
File
- ./
twitter.pages.inc, line 184 - Page callbacks for Twitter module.
Code
function theme_twitter_account_list_form($form) {
if (variable_get('twitter_import', TRUE) && user_access('import own tweets')) {
$header = array(
'',
t('Name'),
t('Description'),
t('Private'),
t('Import'),
t('Delete'),
);
}
else {
$header = array(
'',
t('Name'),
t('Description'),
t('Private'),
t('Delete'),
);
}
if (user_access('make twitter accounts global')) {
$header[] = '';
}
$rows = array();
foreach (element_children($form['accounts']) as $key) {
$element =& $form['accounts'][$key];
if (variable_get('twitter_import', TRUE) && user_access('import own tweets')) {
$row = array(
drupal_render($element['image']),
drupal_render($element['id']) . drupal_render($element['screen_name']) . drupal_render($element['visible_name']),
drupal_render($element['description']),
drupal_render($element['protected']),
drupal_render($element['import']),
drupal_render($element['delete']),
);
}
else {
$row = array(
drupal_render($element['image']),
drupal_render($element['id']) . drupal_render($element['screen_name']) . drupal_render($element['visible_name']),
drupal_render($element['description']),
drupal_render($element['protected']),
drupal_render($element['delete']),
);
}
if (user_access('make twitter accounts global')) {
$label = $element['#account']->is_global ? t('remove global') : t('make global');
$row[] = l($label, 'user/' . $element['#account']->uid . '/edit/twitter/global/' . $element['#account']->id);
}
$rows[] = $row;
}
$output = theme('table', $header, $rows);
$output .= drupal_render($form);
return $output;
}