function hook_xmlsitemap_link_alter in XML sitemap 8
Same name and namespace in other branches
- 6.2 xmlsitemap.api.php \hook_xmlsitemap_link_alter()
- 7.2 xmlsitemap.api.php \hook_xmlsitemap_link_alter()
- 2.x xmlsitemap.api.php \hook_xmlsitemap_link_alter()
Alter the data of a sitemap link before the link is saved.
Parameters
array $link: An array with the data of the sitemap link.
array $context: An optional context array containing data related to the link.
2 functions implement hook_xmlsitemap_link_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- metatag_xmlsitemap_link_alter in ./
xmlsitemap.module - Implements hook_xmlsitemap_link_alter() on behalf of metatag.module.
- xmlsitemap_xmlsitemap_link_alter in ./
xmlsitemap.module - Implements hook_xmlsitemap_link_alter().
1 invocation of hook_xmlsitemap_link_alter()
- XmlSitemapLinkStorage::save in src/
XmlSitemapLinkStorage.php - Saves or updates a sitemap link.
File
- ./
xmlsitemap.api.php, line 58 - Hooks provided by the XML sitemap module.
Code
function hook_xmlsitemap_link_alter(array &$link, array $context) {
if ($link['type'] == 'mymodule') {
$link['priority'] += 0.5;
}
}