You are here

function _xmlsitemap_node_submit in XML sitemap 5

Same name and namespace in other branches
  1. 5.2 xmlsitemap_node/xmlsitemap_node.module \_xmlsitemap_node_submit()

Add submit actions to forms.

Return value

None

Related topics

File

xmlsitemap_node/xmlsitemap_node.module, line 342
Adds nodes to the site map.

Code

function _xmlsitemap_node_submit($form_id, $form_values) {
  switch ($form_id) {
    case 'node_type_form':
      $op = isset($form_values['op']) ? $form_values['op'] : '';
      $type = isset($form_values['old_type']) ? $form_values['old_type'] : trim($form_values['type']);
      $priority = $form_values['xmlsitemap_node_type_priority'];
      $old_priority = $form_values['xmlsitemap_old_priority'];
      if ($op == t('Save content type') && $priority != $old_priority || $op == t('Reset to defaults') && $old_priority != 0.1) {
        xmlsitemap_update_sitemap();
      }
      break;
  }
}