function xmlsitemap_sitemap_delete_form in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.admin.inc \xmlsitemap_sitemap_delete_form()
1 string reference to 'xmlsitemap_sitemap_delete_form'
- xmlsitemap_menu in ./
xmlsitemap.module - Implements hook_menu().
File
- ./
xmlsitemap.admin.inc, line 245 - Administrative page callbacks for the xmlsitemap module.
Code
function xmlsitemap_sitemap_delete_form(array &$form_state, stdClass $sitemap) {
_xmlsitemap_set_breadcrumb();
$count = (int) db_result(db_query("SELECT COUNT(smid) FROM {xmlsitemap_sitemap}"));
if ($count === 1 && empty($_POST)) {
drupal_set_message(t('It is not recommended to delete the only XML sitemap.'), 'error');
}
$form['#sitemap'] = $sitemap;
$form['smid'] = array(
'#type' => 'value',
'#value' => $sitemap->smid,
);
return confirm_form($form, t('Are you sure you want to delete the XML sitemap?'), 'admin/settings/xmlsitemap', '', t('Delete'), t('Cancel'));
}