acf_get_field_rest_schema()
Get the REST API schema for a given field.
Хуки из функции
Возвращает
Массив
.
Использование
acf_get_field_rest_schema( $field );
- $field(массив) (обязательный)
- -
Код acf_get_field_rest_schema() acf get field rest schema ACF 6.0.4
function acf_get_field_rest_schema( array $field ) { $type = acf_get_field_type( $field['type'] ); $schema = array(); if ( ! is_object( $type ) || ! method_exists( $type, 'get_rest_schema' ) ) { return $schema; } $schema = $type->get_rest_schema( $field ); /** * Filter the REST API schema for a given field. * * @param array $schema The field schema array. * @param array $field The field array. */ return (array) apply_filters( 'acf/rest/get_field_schema', $schema, $field ); }