You are here

function answers_field_get_value in Answers 7.3

Same name and namespace in other branches
  1. 7.2 includes/answers.field_utils.inc \answers_field_get_value()

Returns the value of a field for a node.

Parameters

object $node: The node that contains the field.

string $field: The field name.

Return value

mixed The value of the field.

3 calls to answers_field_get_value()
answers_node_view in ./answers.module
Implements hook_node_view().
answers_notify in includes/answers.notify.inc
Send a notification.
answers_notify_new_answer in includes/answers.notify.inc
If configured to, notify question author of an answer.

File

includes/answers.field_utils.inc, line 19
Field utility functions for the 'Answers' module.

Code

function answers_field_get_value($node, $field) {
  $items = field_get_items('node', $node, $field);
  return $items[0]['value'];
}