acf_field_google_map::get_rest_schema()
Return the schema array for the REST API.
Метод класса: acf_field_google_map{}
Хуков нет.
Возвращает
Массив
.
Использование
$acf_field_google_map = new acf_field_google_map(); $acf_field_google_map->get_rest_schema( $field );
- $field(массив) (обязательный)
- -
Код acf_field_google_map::get_rest_schema() acf field google map::get rest schema ACF 6.0.4
public function get_rest_schema( array $field ) { return array( 'type' => array( 'object', 'null' ), 'required' => ! empty( $field['required'] ), 'properties' => array( 'address' => array( 'type' => 'string', ), 'lat' => array( 'type' => array( 'string', 'float' ), ), 'lng' => array( 'type' => array( 'string', 'float' ), ), 'zoom' => array( 'type' => array( 'string', 'int' ), ), 'place_id' => array( 'type' => 'string', ), 'name' => array( 'type' => 'string', ), 'street_number' => array( 'type' => array( 'string', 'int' ), ), 'street_name' => array( 'type' => 'string', ), 'street_name_short' => array( 'type' => 'string', ), 'city' => array( 'type' => 'string', ), 'state' => array( 'type' => 'string', ), 'state_short' => array( 'type' => 'string', ), 'post_code' => array( 'type' => array( 'string', 'int' ), ), 'country' => array( 'type' => 'string', ), 'country_short' => array( 'type' => 'string', ), ), ); }