Sets submission values data for the submission, to be used with the field manager.
Description
See also
Parameters
- $value
-
(array) (Required) Submission values data.
Source
File: src/db-objects/submissions/submission.php
protected function set_submission_values_data( $value ) { if ( ! is_array( $value ) ) { return; } $data = array(); foreach ( $value as $item ) { $data[] = array( 'id' => ! empty( $item['id'] ) ? (int) $item['id'] : 0, 'element_id' => ! empty( $item['element_id'] ) ? (int) $item['element_id'] : 0, 'field' => ! empty( $item['field'] ) ? sanitize_key( $item['field'] ) : '', 'value' => ! empty( $item['value'] ) ? $item['value'] : '', ); } $this->values = $data; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |