You are here

function hashtags_node_load in Hashtags 7.2

Implementation of hook_node_load().

File

./hashtags.module, line 170

Code

function hashtags_node_load($nodes) {
  $vid = variable_get('hashtags_vocabulary', 0);
  foreach ($nodes as $node) {
    if (_hashtags_node_check_node_type($node)) {
      $terms = hashtags_node_get_terms($node->nid);
      if (isset($node->teaser)) {
        $node->teaser['und'][0]['safe_value'] = hashtags_node_transform_to_links($node->teaser['und'][0]['safe_value'], $terms);
      }
      else {
        $node->body['und'][0]['safe_value'] = hashtags_node_transform_to_links($node->body['und'][0]['safe_value'], $terms);
      }
    }
  }
}