You are here

function _patterns_get_field_value in Patterns 6

Same name and namespace in other branches
  1. 6.2 components/node.inc \_patterns_get_field_value()
1 call to _patterns_get_field_value()
node_patterns in components/node.inc

File

components/node.inc, line 393

Code

function _patterns_get_field_value($field, $key, $default) {
  if (is_array($field)) {
    return isset($field[$key]) ? $field[$key] : $default;
  }
  elseif (is_numeric($field) || is_string($field)) {
    return $field;
  }
  else {
    return $default;
  }
}