You are here

answers.field_utils.inc in Answers 7.2

Same filename and directory in other branches
  1. 7.3 includes/answers.field_utils.inc

Field utility functions for the 'Answers' module

@author Chip Cleary

File

includes/answers.field_utils.inc
View source
<?php

// $Id$

/**
 * @file
 * Field utility functions for the 'Answers' module
 * 
 * @author Chip Cleary
 * 
 */
function answers_field_get_value($node, $field) {
  $items = field_get_items('node', $node, $field);
  return $items[0]['value'];
}
function answers_field_get_node_reference($source_node, $field) {
  $items = field_get_items('node', $source_node, $field);
  $target_nid = $items[0]['nid'];
  return node_load($target_nid);
}

Functions

Namesort descending Description
answers_field_get_node_reference
answers_field_get_value @file Field utility functions for the 'Answers' module