fields() public method

Return field array from a Pod, a field's data, or a field option
Since: 2.0
public fields ( null $field = null, null $option = null ) : boolean | mixed
$field null
$option null
return boolean | mixed
 /**
  * Add fields, based on options to REST read/write requests
  *
  * @since  2.5.6
  *
  * @access protected
  */
 protected function add_fields()
 {
     $fields = $this->pod->fields();
     foreach ($fields as $field_name => $field) {
         $read = self::field_allowed_to_extend($field_name, $this->pod, 'read');
         $write = self::field_allowed_to_extend($field_name, $this->pod, 'write');
         $this->register($field_name, $read, $write);
     }
 }