function taxonomy_revision_field_storage_pre_insert in Taxonomy revision 7
Implements hook_field_storage_pre_insert().
File
- ./
taxonomy_revision.module, line 332 - This is the main module file for the Taxonomy revision module.
Code
function taxonomy_revision_field_storage_pre_insert($entity_type, $entity, &$skip_fields) {
if ($entity_type == 'taxonomy_term') {
// Save the term in the revision table. This needs to be done in
// hook_field_storage_pre_insert() because it must run after
// taxonomy_term_save() has written data to the {taxonomy_term_data} table
// (meaning that the entity object now has a term ID attached to it) but
// before field data has been written to the database (so we still have
// time to attach the correct revision ID to the entity object before the
// field API uses it).
_taxonomy_revision_taxonomy_term_save_revision($entity);
}
}