You are here

function theme_xmlsitemap_settings_additional in XML sitemap 5

Theme additional links form.

Related topics

File

./xmlsitemap.module, line 220
Creates a site map compatible with the sitemaps.org schema.

Code

function theme_xmlsitemap_settings_additional($form) {
  $output = '';
  $output .= drupal_render($form['xmlsitemap_additional_links_priority']);
  $header = array(
    t('Delete'),
    t('Path'),
    t('Priority'),
  );
  foreach (element_children($form['link']) as $id) {
    $row = array();
    $row[] = isset($form['delete'][$id]) ? drupal_render($form['delete'][$id]) : array_merge(array(
      'header' => TRUE,
      'valign' => 'bottom',
    ), theme('table_select_header_cell'));
    $row[] = drupal_render($form['link'][$id]);
    $row[] = drupal_render($form['priority'][$id]);
    $rows[$id] = array(
      'data' => $row,
      'valign' => 'top',
    );
  }
  if (!empty($rows)) {
    $output .= theme('table', $header, $rows);
  }
  $output .= drupal_render($form);
  drupal_add_js('document.getElementById("edit-link-new").focus()', 'inline', 'footer');
  return $output;
}