core/Field/Select_Field.php 1 location
|
@@ 36-48 (lines=13) @@
|
| 33 |
|
/** |
| 34 |
|
* {@inheritDoc} |
| 35 |
|
*/ |
| 36 |
|
public function to_json( $load ) { |
| 37 |
|
$field_data = parent::to_json( $load ); |
| 38 |
|
|
| 39 |
|
$options = $this->parse_options( $this->get_options(), true ); |
| 40 |
|
$value = strval( $this->get_formatted_value() ); |
| 41 |
|
|
| 42 |
|
$field_data = array_merge( $field_data, array( |
| 43 |
|
'value' => strval( $value ), |
| 44 |
|
'options' => $options, |
| 45 |
|
) ); |
| 46 |
|
|
| 47 |
|
return $field_data; |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
/** |
| 51 |
|
* {@inheritDoc} |
core/Field/Set_Field.php 1 location
|
@@ 59-72 (lines=14) @@
|
| 56 |
|
/** |
| 57 |
|
* {@inheritDoc} |
| 58 |
|
*/ |
| 59 |
|
public function to_json( $load ) { |
| 60 |
|
$field_data = parent::to_json( $load ); |
| 61 |
|
|
| 62 |
|
$options = $this->parse_options( $this->get_options(), true ); |
| 63 |
|
$value = array_map( 'strval', $this->get_formatted_value() ); |
| 64 |
|
|
| 65 |
|
$field_data = array_merge( $field_data, array( |
| 66 |
|
'options' => $options, |
| 67 |
|
'value' => $value, |
| 68 |
|
'limit_options' => $this->limit_options, |
| 69 |
|
) ); |
| 70 |
|
|
| 71 |
|
return $field_data; |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
/** |
| 75 |
|
* {@inheritDoc} |