acf_field_link::get_rest_schema
Return the schema array for the REST API.
Method of the class: acf_field_link{}
No Hooks.
Returns
array.
Usage
$acf_field_link = new acf_field_link(); $acf_field_link->get_rest_schema( $field );
- $field(array) (required)
- .
acf_field_link::get_rest_schema() acf field link::get rest schema code ACF 6.8.8
public function get_rest_schema( array $field ) {
return array(
'type' => array( 'object', 'null' ),
'required' => ! empty( $field['required'] ),
'properties' => array(
'title' => array(
'type' => 'string',
),
'url' => array(
'type' => 'string',
'required' => true,
'format' => 'uri',
),
'target' => array(
'type' => 'string',
),
),
);
}