Transforms single field data into an array to be passed to JavaScript applications.
Description
See also
Parameters
- $current_value
-
(mixed) (Required) Current value of the field.
Return
(array) Field data to be JSON-encoded.
Source
File: src/modules/access-controls/autocomplete-with-button.php
protected function single_to_json( $current_value ) { $data = parent::single_to_json( $current_value ); $data['buttonLabel'] = $this->button_label; $data['buttonAttrs'] = $this->button_attrs; return $data; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |