summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/module.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/module.inc b/includes/module.inc
index 769f60620..9b5944b87 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -846,6 +846,9 @@ function module_implements_write_cache() {
/**
* Invokes a hook in a particular module.
*
+ * All arguments are passed by value. Use drupal_alter() if you need to pass
+ * arguments by reference.
+ *
* @param $module
* The name of the module (without the .module extension).
* @param $hook
@@ -855,6 +858,8 @@ function module_implements_write_cache() {
*
* @return
* The return value of the hook implementation.
+ *
+ * @see drupal_alter()
*/
function module_invoke($module, $hook) {
$args = func_get_args();
@@ -868,6 +873,9 @@ function module_invoke($module, $hook) {
/**
* Invokes a hook in all enabled modules that implement it.
*
+ * All arguments are passed by value. Use drupal_alter() if you need to pass
+ * arguments by reference.
+ *
* @param $hook
* The name of the hook to invoke.
* @param ...
@@ -876,6 +884,8 @@ function module_invoke($module, $hook) {
* @return
* An array of return values of the hook implementations. If modules return
* arrays from their implementations, those are merged into one array.
+ *
+ * @see drupal_alter()
*/
function module_invoke_all($hook) {
$args = func_get_args();