You are here

function feedapi_inherit_nodeapi in FeedAPI 5

Same name and namespace in other branches
  1. 6 feedapi_inherit/feedapi_inherit.module \feedapi_inherit_nodeapi()

Implementation of hook_nodeapi().

File

feedapi_inherit/feedapi_inherit.module, line 29
Inherit group and taxonomy settings from feeds to news items This is an add on processor for FeedAPI

Code

function feedapi_inherit_nodeapi(&$node, $op) {
  switch ($op) {
    case 'prepare':
      if ($node->feedapi_node->feed_nids) {
        foreach ($node->feedapi_node->feed_nids as $feed_nid) {
          $feed_node = node_load($feed_nid);
          if (feedapi_enabled_type($feed_node->type, 'feedapi_inherit')) {
            _feedapi_inherit_do_inherit($node, $feed_node);
          }
        }
      }
      break;
  }
}