Function Reference: geodir_custom_gmaps_init_map_style

Summary

This function has not been documented yet.

Source File

geodir_custom_gmaps_init_map_style() is located in geodir_custom_google_maps/geodir_custom_gmaps_functions.php [Line: 316]

Source Code

function geodir_custom_gmaps_init_map_style() {
	// filter for home map options
	if (get_option('geodir_custom_gmaps_home')) {
		$map_widgets = get_option('widget_geodir_map_v3_home_map');
		
		if (!empty($map_widgets)) {
			add_filter('geodir_map_options_gd_home_map', 'geodir_custom_gmaps_home_map_options', 10, 1); // Custom stype for shortcoded home page map.
			
			foreach ($map_widgets as $key => $value) {
				add_filter('geodir_map_options_geodir_map_v3_home_map_'.(int)$key, 'geodir_custom_gmaps_home_map_options', 10, 1);
			}
		}
	}
	
	// filter for listing map options
	if (get_option('geodir_custom_gmaps_listing')) {
		$map_widgets = get_option('widget_geodir_map_v3_listing_map');
		
		if (!empty($map_widgets)) {
			add_filter('geodir_map_options_gd_listing_map', 'geodir_custom_gmaps_listing_map_options', 10, 1); // Custom stype for shortcoded listing page map.
			
			foreach ($map_widgets as $key => $value) {
				add_filter('geodir_map_options_geodir_map_v3_listing_map_'.(int)$key, 'geodir_custom_gmaps_listing_map_options', 10, 1);
			}
		}
	}
	
	// filter for detail map options
	if (get_option('geodir_custom_gmaps_detail')) {
		add_filter('geodir_map_options_detail_page_map_canvas', 'geodir_custom_gmaps_detail_map_options', 10, 1);
	}
}