diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-08-02 11:25:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-08-02 11:25:18 +0000 |
commit | eaf21849a1643087fa014d3cdf528cc17cccb252 (patch) | |
tree | b93deac7b172731fd2d89af65d3dbd5a1fb4acf3 /modules/system | |
parent | 065346b3662e0ead6d4e7e0cffdc4d3aed4b2753 (diff) | |
download | brdo-eaf21849a1643087fa014d3cdf528cc17cccb252.tar.gz brdo-eaf21849a1643087fa014d3cdf528cc17cccb252.tar.bz2 |
- Accidentically committed two patches at once. Rolled back one of them. Sorry.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.api.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 550d43431..9c5435275 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -558,6 +558,25 @@ function hook_link($type, $object, $build_mode) { } /** + * Perform alterations before links on a comment are rendered. One popular use of + * this hook is to modify/remove links from other modules. If you want to add a link + * to the links section of a node, use hook_link instead. + * + * @param $links + * Nested array of links for the node keyed by providing module. + * @param $node + * A node object that contains the links. + */ +function hook_link_alter(array &$links, $node) { + foreach ($links as $module => $link) { + if (strpos($module, 'taxonomy_term') !== FALSE) { + // Link back to the forum and not the taxonomy term page + $links[$module]['href'] = str_replace('taxonomy/term', 'forum', $link['href']); + } + } +} + +/** * Perform alterations profile items before they are rendered. You may omit/add/re-sort/re-categorize, etc. * * @param $account |