You are here

function xmlsitemap_link_delete in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.module \xmlsitemap_link_delete()

Delete a specific sitemap link from the database.

If a visible sitemap link was deleted, this will automatically set the regenerate needed flag.

Parameters

$entity_type: A string with the entity type.

$entity_id: An integer with the entity ID.

Return value

The number of links that were deleted.

Related topics

7 calls to xmlsitemap_link_delete()
XMLSitemapUnitTest::testLinkDelete in ./xmlsitemap.test
Tests for xmlsitemap_link_delete().
XMLSitemapUnitTest::testMinimumLifetime in ./xmlsitemap.test
Test that the sitemap will not be genereated before the lifetime expires.
xmlsitemap_custom_delete_link_form_submit in xmlsitemap_custom/xmlsitemap_custom.admin.inc
xmlsitemap_menu_menu_item_delete_form_submit in xmlsitemap_menu/xmlsitemap_menu.module
Form submit callback; delete the sitemap link when a menu item is deleted.
xmlsitemap_node_nodeapi in xmlsitemap_node/xmlsitemap_node.module
Implements hook_nodeapi().

... See full list

File

./xmlsitemap.module, line 657
Main file for the xmlsitemap module.

Code

function xmlsitemap_link_delete($entity_type, $entity_id) {
  $conditions = array(
    'type' => $entity_type,
    'id' => $entity_id,
  );
  return xmlsitemap_link_delete_multiple($conditions);
}