| @@ 49-62 (lines=14) @@ | ||
| 46 | /** |
|
| 47 | * {@inheritDoc} |
|
| 48 | */ |
|
| 49 | public function to_json( $load ) { |
|
| 50 | $field_data = parent::to_json( $load ); |
|
| 51 | ||
| 52 | $options = $this->parse_options( $this->get_options(), true ); |
|
| 53 | $value = strval( $this->get_formatted_value() ); |
|
| 54 | ||
| 55 | $field_data = array_merge( |
|
| 56 | $field_data, |
|
| 57 | array( |
|
| 58 | 'value' => strval( $value ), |
|
| 59 | 'options' => $options, |
|
| 60 | 'has_ui' => $this->has_ui, |
|
| 61 | ) |
|
| 62 | ); |
|
| 63 | ||
| 64 | return $field_data; |
|
| 65 | } |
|
| @@ 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} |
|