summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-10-03 02:04:55 +0000
committerDries Buytaert <dries@buytaert.net>2010-10-03 02:04:55 +0000
commit33695f71f3ac6b2a88419874799d89c75e4fcaab (patch)
treec0a4c369184ef2b2922f7a720dc0e9b137e77f43 /includes
parentfc2839047ee4166682a39329ae8a54bfcd6bc736 (diff)
downloadbrdo-33695f71f3ac6b2a88419874799d89c75e4fcaab.tar.gz
brdo-33695f71f3ac6b2a88419874799d89c75e4fcaab.tar.bz2
- Patch #917670 by mr.baileys: improve drupal_alter() documentation.
Diffstat (limited to 'includes')
-rw-r--r--includes/module.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/module.inc b/includes/module.inc
index e0980bb14..40396b101 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -832,7 +832,7 @@ function drupal_required_modules() {
* @endcode
*
* @param $type
- * A string describing the data type of the alterable $data. 'form', 'links',
+ * A string describing the type of the alterable $data. 'form', 'links',
* 'node_content', and so on are several examples. Alternatively can be an
* array, in which case hook_TYPE_alter() is invoked for each value in the
* array, ordered first by module, and then for each module, in the order of
@@ -840,13 +840,16 @@ function drupal_required_modules() {
* execute both hook_form_alter() and hook_form_FORM_ID_alter()
* implementations, it passes array('form', 'form_' . $form_id) for $type.
* @param &$data
- * The primary data to be altered.
+ * The variable that will be passed to hook_TYPE_alter() implementations to be
+ * altered. The type of this variable depends on the value of the $type
+ * argument. For example, when altering a 'form', $data will be a structured
+ * array. When altering a 'profile', $data will be an object.
* @param &$context1
* (optional) An additional variable that is passed by reference.
* @param &$context2
* (optional) An additional variable that is passed by reference. If more
* context needs to be provided to implementations, then this should be an
- * keyed array as described above.
+ * associative array as described above.
*/
function drupal_alter($type, &$data, &$context1 = NULL, &$context2 = NULL) {
// Use the advanced drupal_static() pattern, since this is called very often.