<?php

if( function_exists('acf_add_local_field_group') ):

	acf_add_local_field_group(array(
		'key' => 'mapify_acf_group_604cde8eca652',
		'title' => 'MapifyLite Options',
		'fields' => array(
			array(
				'key' => 'mapify_acf_field_604d81bbc44d5',
				'label' => 'Map',
				'name' => 'mapify_map',
				'type' => 'mapify_map_dropdown',
				'instructions' => 'Need more than one map? <a href="http://www.mapifypro.com/" target="_blank">Upgrade to MapifyPro!</a>',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
			),
			array(
				'key' => 'mapify_acf_field_604cdf0453143',
				'label' => 'Enable Popup',
				'name' => '_map_location_tooltip_enabled',
				'type' => 'select',
				'instructions' => '',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'choices' => array(
					'yes' => 'Yes',
					'no' => 'No',
				),
				'default_value' => false,
				'allow_null' => 0,
				'multiple' => 0,
				'ui' => 0,
				'return_format' => 'value',
				'ajax' => 0,
				'placeholder' => '',
			),
			array(
				'key' => 'mapify_acf_field_604cdf5053144',
				'label' => 'Enable Tooltip',
				'name' => '_map_location_tooltip_show',
				'type' => 'select',
				'instructions' => '',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'choices' => array(
					'yes' => 'Yes',
					'no' => 'No',
				),
				'default_value' => false,
				'allow_null' => 0,
				'multiple' => 0,
				'ui' => 0,
				'return_format' => 'value',
				'ajax' => 0,
				'placeholder' => '',
			),
			array(
				'key' => 'mapify_acf_field_604cdfb374849',
				'label' => 'Close Tooltip',
				'name' => '_map_location_tooltip_close',
				'type' => 'select',
				'instructions' => '<b>Automatically</b>: This will cause the tooltip to automatically hide when the user hovers off the location.<br><b>Manually</b>: Good if you want to add links to the tooltip.',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'choices' => array(
					'auto' => 'Automatically',
					'manual' => 'Manually',
				),
				'default_value' => false,
				'allow_null' => 0,
				'multiple' => 0,
				'ui' => 0,
				'return_format' => 'value',
				'ajax' => 0,
				'placeholder' => '',
			),
			array(
				'key' => 'mapify_acf_field_604ce035e7d8e',
				'label' => 'Tooltip',
				'name' => '_map_location_tooltip',
				'type' => 'textarea',
				'instructions' => 'This is the brief text that appears in the tooltip when a user hovers over this location. You may use basic html text formatting, such as &lt;br&gt;, &lt;i&gt;, etc.',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'default_value' => '',
				'placeholder' => '',
				'maxlength' => '',
				'rows' => '',
				'new_lines' => '',
			),
		),
		'location' => array(
			array(
				array(
					'param' => 'post_type',
					'operator' => '==',
					'value' => 'map-location',
				),
			),
		),
		'menu_order' => 0,
		'position' => 'normal',
		'style' => 'default',
		'label_placement' => 'top',
		'instruction_placement' => 'label',
		'hide_on_screen' => '',
		'active' => true,
		'description' => '',
	));
	
	acf_add_local_field_group(array(
		'key' => 'mapify_acf_group_604ce142884e6',
		'title' => 'Gallery Settings',
		'fields' => array(
			array(
				'key' => 'mapify_acf_field_604ce14b0e4b9',
				'label' => 'Video Embed Code',
				'name' => '_map_location_video_embed',
				'type' => 'textarea',
				'instructions' => 'Use Vimeo or YouTube iframe video embed codes to include a video in your location’s pop-up gallery. If left blank, the gallery will revert to an image gallery only.',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'default_value' => '',
				'placeholder' => '',
				'maxlength' => '',
				'rows' => '',
				'new_lines' => '',
			),
			array(
				'key' => 'mapify_acf_field_604ce18a0e4ba',
				'label' => 'Gallery Images',
				'name' => 'mapify_gallery_images',
				'type' => 'mapify_gallery_uploader',
				'instructions' => 'Add your desired images from the gallery. You can always edit the image URL after it.',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
			),
		),
		'location' => array(
			array(
				array(
					'param' => 'post_type',
					'operator' => '==',
					'value' => 'map-location',
				),
			),
		),
		'menu_order' => 1,
		'position' => 'normal',
		'style' => 'default',
		'label_placement' => 'top',
		'instruction_placement' => 'label',
		'hide_on_screen' => '',
		'active' => true,
		'description' => '',
	));
	
	acf_add_local_field_group(array(
		'key' => 'mapify_acf_group_604ce1e87a9ec',
		'title' => 'Map Location',
		'fields' => array(
			array(
				'key' => 'mapify_acf_field_604ce1f6dab7d',
				'label' => 'Location',
				'name' => 'location',
				'type' => 'mapify_map_locator',
				'instructions' => 'Select a location on the map.',
				'required' => 0,
				'conditional_logic' => 0,
				'wrapper' => array(
					'width' => '',
					'class' => '',
					'id' => '',
				),
				'lattitude' => '-1.634541720929286',
				'longitude' => '119.9030508161835',
				'zoom_level' => 4,
			),
		),
		'location' => array(
			array(
				array(
					'param' => 'post_type',
					'operator' => '==',
					'value' => 'map-location',
				),
			),
		),
		'menu_order' => 2,
		'position' => 'normal',
		'style' => 'default',
		'label_placement' => 'top',
		'instruction_placement' => 'label',
		'hide_on_screen' => '',
		'active' => true,
		'description' => '',
	));
	
	endif;