forum_url_outbound_alter
- Versions
- 7
forum_url_outbound_alter(&$path, &$options, $original_path)
Implements hook_url_outbound_alter().
Code
modules/forum/forum.module, line 697
<?php
function forum_url_outbound_alter(&$path, &$options, $original_path) {
if (preg_match('!^taxonomy/term/(\d+)!', $path, $matches)) {
$term = taxonomy_term_load($matches[1]);
if ($term && $term->vocabulary_machine_name == 'forums') {
$path = 'forum/' . $matches[1];
}
}
}
?>Login or register to post comments 