acf_field_icon_picker::get_rest_schema
Returns the schema used by the REST API.
Method of the class: acf_field_icon_picker{}
No Hooks.
Returns
Array.
Usage
$acf_field_icon_picker = new acf_field_icon_picker(); $acf_field_icon_picker->get_rest_schema( $field ): array;
- $field(array) (required)
- The main field array.
Changelog
| Since 6.3 | Introduced. |
acf_field_icon_picker::get_rest_schema() acf field icon picker::get rest schema code ACF 6.8.8
public function get_rest_schema( array $field ): array {
return array(
'type' => array( 'object', 'null' ),
'required' => ! empty( $field['required'] ),
'properties' => array(
'type' => array(
'description' => esc_html__( 'The type of icon to save.', 'acf' ),
'type' => array( 'string' ),
'required' => true,
'enum' => array_keys( $this->get_tabs() ),
),
'value' => array(
'description' => esc_html__( 'The value of icon to save.', 'acf' ),
'type' => array( 'string', 'int' ),
'required' => true,
),
),
);
}