summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-09 11:36:04 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-09 11:36:04 +0000
commit8ad5cba994367f5b5fe35a2caaae7ec321ecaebd (patch)
tree1369c05e8399685116fea5939051eb4855017f26 /modules/system
parentc0cb68abccfa5daa442ad3deb410b81c7da7a52b (diff)
downloadbrdo-8ad5cba994367f5b5fe35a2caaae7ec321ecaebd.tar.gz
brdo-8ad5cba994367f5b5fe35a2caaae7ec321ecaebd.tar.bz2
- Patch #344661 by Dave Reid: API doc improvements for hook_translation_link_alter.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.api.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 03e9b4618..faac9a174 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -397,21 +397,22 @@ function hook_link($type, $object, $teaser = FALSE) {
}
/**
- * Perform alterations before links on a node are rendered. One popular use of
- * this hook is to add/delete links from other modules.
+ * Perform alterations before links on a node are rendered.
+ *
+ * One popular use of this hook is to add/delete links from other modules.
*
* @param $links
- * Nested array of links for the node
+ * Nested array of links for the node keyed by providing module.
* @param $node
- * A node object for editing links on
+ * A node object that contains the links.
* @return
* None.
*/
-function hook_link_alter(&$links, $node) {
- foreach ($links AS $module => $link) {
+function hook_link_alter(array &$links, $node) {
+ foreach ($links as $module => $link) {
if (strstr($module, 'taxonomy_term')) {
// Link back to the forum and not the taxonomy term page
- $links[$module]['#href'] = str_replace('taxonomy/term', 'forum', $link['#href']);
+ $links[$module]['href'] = str_replace('taxonomy/term', 'forum', $link['href']);
}
}
}