public function get_field($field_name)
{
$value = apply_filters('timber_post_get_meta_field_pre', null, $this->ID, $field_name, $this);
if ($value === null) {
$value = get_post_meta($this->ID, $field_name);
if (is_array($value) && count($value) == 1) {
$value = $value[0];
}
if (is_array($value) && count($value) == 0) {
$value = null;
}
}
$value = apply_filters('timber_post_get_meta_field', $value, $this->ID, $field_name, $this);
$value = $this->convert($value, __CLASS__);
return $value;
}