You are here

function hook_xmlsitemap_link_insert in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.api.php \hook_xmlsitemap_link_insert()
  2. 7.2 xmlsitemap.api.php \hook_xmlsitemap_link_insert()
  3. 2.x xmlsitemap.api.php \hook_xmlsitemap_link_insert()

Inform modules that an XML sitemap link has been created.

Parameters

$link: Associative array defining an XML sitemap link as passed into xmlsitemap_link_save().

See also

hook_xmlsitemap_link_update()

1 invocation of hook_xmlsitemap_link_insert()
xmlsitemap_link_save in ./xmlsitemap.module
Saves or updates a sitemap link.

File

./xmlsitemap.api.php, line 81
Hooks provided by the XML sitemap module.

Code

function hook_xmlsitemap_link_insert(array $link) {
  db_insert('mytable')
    ->fields(array(
    'link_type' => $link['type'],
    'link_id' => $link['id'],
    'link_status' => $link['status'],
  ))
    ->execute();
}