You are here

function xmlsitemap_process_form_link_options in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_process_form_link_options()
  2. 6.2 xmlsitemap.module \xmlsitemap_process_form_link_options()
  3. 2.x xmlsitemap.module \xmlsitemap_process_form_link_options()

Form Link.

1 string reference to 'xmlsitemap_process_form_link_options'
xmlsitemap_add_form_link_options in ./xmlsitemap.admin.inc
Add a link's XML sitemap options to the link's form.

File

./xmlsitemap.module, line 1478
xmlsitemap XML sitemap

Code

function xmlsitemap_process_form_link_options($form, &$form_state) {
  $link =& $form_state['values']['xmlsitemap'];
  $fields = array(
    'status' => XMLSITEMAP_STATUS_DEFAULT,
    'priority' => XMLSITEMAP_PRIORITY_DEFAULT,
  );
  if (empty($link)) {
    return;
  }
  foreach ($fields as $field => $default) {
    if ($link[$field] === 'default') {
      $link[$field] = isset($link[$field . '_default']) ? $link[$field . '_default'] : $default;
      $link[$field . '_override'] = 0;
    }
    else {
      $link[$field . '_override'] = 1;
    }
  }
}