PodsUI::get_field PHP Method

get_field() public method

public get_field ( $field ) : array | boolean | mixed | null
$field
return array | boolean | mixed | null
    public function get_field($field)
    {
        $value = null;
        // use PodsData to get field
        if ($callback = $this->callback('get_field', $field)) {
            return $callback;
        }
        if (isset($this->row[$field])) {
            $value = $this->row[$field];
        } elseif (false !== $this->pod && is_object($this->pod) && ('Pods' == get_class($this->pod) || 'Pod' == get_class($this->pod))) {
            if ('Pod' == get_class($this->pod)) {
                $value = $this->pod->get_field($field);
            } else {
                $value = $this->pod->field($field);
            }
        }
        return $this->do_hook('get_field', $value, $field);
    }