forum_prepare

Versions
4.7 – 5
forum_prepare(&$node)

Implementation of hook_prepare; assign forum taxonomy when adding a topic from within a forum.

Code

modules/forum.module, line 406

<?php
function forum_prepare(&$node) {
  if (!$node->nid) {
    // new topic
    $node->taxonomy[arg(3)]->vid = _forum_get_vid();
    $node->taxonomy[arg(3)]->tid = arg(3);
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.