function xmlsitemap_get_rebuildable_link_types in XML sitemap 6.2
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_get_rebuildable_link_types()
- 7.2 xmlsitemap.generate.inc \xmlsitemap_get_rebuildable_link_types()
- 2.x xmlsitemap.module \xmlsitemap_get_rebuildable_link_types()
3 calls to xmlsitemap_get_rebuildable_link_types()
- drush_xmlsitemap_rebuild in ./
xmlsitemap.drush.inc - Dump and rebuild all the sitemap data, then regenerate the files.
- xmlsitemap_rebuild_form in ./
xmlsitemap.admin.inc - Menu callback; Confirm rebuilding of the sitemap.
- _xmlsitemap_rebuild_form_access in ./
xmlsitemap.module - Menu access callback; determines if the user can use the rebuild links page.
File
- ./
xmlsitemap.generate.inc, line 545 - Sitemap generation and rebuilding functions for the xmlsitemap module.
Code
function xmlsitemap_get_rebuildable_link_types() {
$rebuild_types = array();
$entities = xmlsitemap_get_link_info();
foreach ($entities as $entity => $info) {
if (empty($info['xmlsitemap']['rebuild callback'])) {
// If the entity is missing a rebuild callback, skip.
continue;
}
if (!empty($info['entity keys']['bundle']) && !xmlsitemap_get_link_type_enabled_bundles($entity)) {
// If the entity has bundles, but no enabled bundles, skip since
// rebuilding wouldn't get any links.
continue;
}
else {
$rebuild_types[] = $entity;
}
}
return $rebuild_types;
}