function yoast_seo_entity_delete in Real-time SEO for Drupal 7
Implements hook_entity_delete().
File
- ./
yoast_seo.module, line 766 - Primary hook implementations for Yoast SEO for Drupal module.
Code
function yoast_seo_entity_delete($entity, $type) {
// Currently we only support nodes, so checking for a node ID seems like a
// good idea.
if (!empty($entity->nid)) {
// Delete the record from our table.
db_delete('yoast_seo')
->condition('entity_type', $type)
->condition('entity_id', $entity->nid)
->execute();
}
}