/** * 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); } }