You are here

function drafty_enforce_entity_presave in Drafty 7

Implements hook_entity_presave().

File

modules/drafty_enforce/drafty_enforce.module, line 22
Hook implementations and API functions for Drafty Enforce module.

Code

function drafty_enforce_entity_presave($entity, $type) {

  // Always force a new revision.
  $entity->revision = TRUE;
  $entity->new_revision = TRUE;
  $entity->is_new_revision = TRUE;
  $entity->default_revision = TRUE;
}