function theme_revenue_sharing_basic_author_percentage_role in Google AdSense integration 7
Same name and namespace in other branches
- 5.3 old/revenue_sharing_basic/revenue_sharing_basic.admin.inc \theme_revenue_sharing_basic_author_percentage_role()
- 6 old/revenue_sharing_basic/revenue_sharing_basic.admin.inc \theme_revenue_sharing_basic_author_percentage_role()
Theme the author percentage part of the settings page.
1 theme call to theme_revenue_sharing_basic_author_percentage_role()
- revenue_sharing_basic_settings in old/
revenue_sharing_basic/ revenue_sharing_basic.admin.inc - Menu callback for the revenue_sharing_basic module settings form.
File
- old/
revenue_sharing_basic/ revenue_sharing_basic.admin.inc, line 118 - Administrative functions of the revenue_sharing_basic module.
Code
function theme_revenue_sharing_basic_author_percentage_role($variables) {
$form = $variables['form'];
$output = '';
$elements = element_children($form);
$rows = array();
if (!empty($elements)) {
$header = array(
t('Role'),
t('Percentage'),
);
foreach ($elements as $key) {
$row = array();
$row[] = $form[$key]['#title'];
unset($form[$key]['#title']);
$row[] = drupal_render($form[$key]);
$rows[] = $row;
}
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
));
}
$output .= drupal_render_children($form);
return $output;
}