<?php

function is_event_post() {
	if ( is_admin() )
		return false;
	if ( get_post_type() != "post" )
		return 0;
	if ( get_post_status() != "publish" )
		return 0;
	return true;
}

function mp_post_event_pages_setting() {
	global $mp_zoom;
	global $mp_zoom_set;
	global $mp_coordinates_default;
	if (is_event_post()) {
		$mp_zoom = $mp_zoom_set[1];

		$location = get_field("location");
		$coordinates = $location->coordinates;

		$mp_coordinates_default = $coordinates;
	}
}

?>
