diff --git a/xmlsitemap_entity/xmlsitemap_entity.module b/xmlsitemap_entity/xmlsitemap_entity.module index 3255535..4a3bb97 100644 --- a/xmlsitemap_entity/xmlsitemap_entity.module +++ b/xmlsitemap_entity/xmlsitemap_entity.module @@ -117,6 +117,12 @@ function xmlsitemap_entity_form_alter(&$form, &$form_state, $form_id) { } } } + // Add a form element to support the inclusion of files in the sitemap + if (isset($form['#file_type'])) { + $entity_type = isset($form['#file_type']->type) ? $form['#file_type']->type : ''; + module_load_include('inc', 'xmlsitemap', 'xmlsitemap.admin'); + xmlsitemap_add_link_bundle_settings($form, $form_state, 'file', $entity_type); + } } /**