You are here

function revision_scheduler_entity_delete in Revision scheduler 7

Implements hook_entity_delete().

File

./revision_scheduler.module, line 193

Code

function revision_scheduler_entity_delete($entity, $entity_type) {

  // Delete all the entity's revisions from the revision_scheduler table.
  list($entity_id) = entity_extract_ids($entity_type, $entity);
  db_delete('revision_scheduler')
    ->condition('entity_type', $entity_type)
    ->condition('entity_id', $entity_id)
    ->execute();
}