function hook_xmlsitemap_link_presave_alter in XML sitemap 7.2
Act on a sitemap link being inserted or updated.
This hook is currently invoked from xmlsitemap_node_node_update() before the node sitemap link is saved to the database with revoked access until the node permissions are checked in the cron.
Parameters
array $link: An array with the data of the sitemap link.
array $context: An optional context array containing data related to the link.
1 invocation of hook_xmlsitemap_link_presave_alter()
- xmlsitemap_link_presave in ./
xmlsitemap.module - Presave a sitemap link.
File
- ./
xmlsitemap.api.php, line 72 - Hooks provided by the XML sitemap module.
Code
function hook_xmlsitemap_link_presave_alter(array &$link, array $context) {
if ($link['type'] == 'mymodule') {
$link['priority'] += 0.5;
}
}