acf_field_google_map::initialize
This function will setup the field type data
Метод класса: acf_field_google_map{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$acf_field_google_map = new acf_field_google_map(); $acf_field_google_map->initialize();
Список изменений
| С версии 5.0.0 | Введена. |
Код acf_field_google_map::initialize() acf field google map::initialize ACF 6.4.2
function initialize() {
// vars
$this->name = 'google_map';
$this->label = __( 'Google Map', 'acf' );
$this->category = 'advanced';
$this->description = __( 'An interactive UI for selecting a location using Google Maps. Requires a Google Maps API key and additional configuration to display correctly.', 'acf' );
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-google-map.png';
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/google-map/', 'docs', 'field-type-selection' );
$this->defaults = array(
'height' => '',
'center_lat' => '',
'center_lng' => '',
'zoom' => '',
);
$this->default_values = array(
'height' => '400',
'center_lat' => '-37.81411',
'center_lng' => '144.96328',
'zoom' => '14',
);
}