acf_field_link::get_rest_schemapublicACF 1.0

Return the schema array for the REST API.

Метод класса: acf_field_link{}

Хуков нет.

Возвращает

array.

Использование

$acf_field_link = new acf_field_link();
$acf_field_link->get_rest_schema( $field );
$field(массив) (обязательный)
.

Код acf_field_link::get_rest_schema() 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',
			),
		),
	);
}