diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 20b0648c7..d04f938ea 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6575,6 +6575,19 @@ function entity_path($entity_type, $entity) { return $info['path callback']($entity); } } +/** + * Invokes entity insert/update hooks. + * + * @param $op + * One of 'insert' or 'update'. + * @param $entity_type + * The entity type; e.g. 'node' or 'user'. + * @param $entity + * The entity object being operated on. + */ +function entity_invoke($op, $entity_type, $entity) { + module_invoke_all('entity_' . $op, $entity, $entity_type); +} /** * Performs one or more XML-RPC request(s). |