You are here

function theme_revenue_sharing_basic_author_percentage_role in Google AdSense integration 5.3

Same name and namespace in other branches
  1. 6 old/revenue_sharing_basic/revenue_sharing_basic.admin.inc \theme_revenue_sharing_basic_author_percentage_role()
  2. 7 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 117
Contains the administrative functions of the revenue_sharing_basic module.

Code

function theme_revenue_sharing_basic_author_percentage_role($form) {
  $output = '';
  $elements = element_children($form);
  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', $header, $rows);
  }
  $output .= drupal_render($form);
  return $output;
}