Available Filters to manipulate data

You are here:
In this article

The plugin has some filters that developers can use to manipulate the output of the maps.

igm_add_meta

Runs as soon as the plugin fetches the meta information for a given map.

Usage example:

add_filter( 'igm_add_meta', 'igm_custom_meta', 1 );
function igm_custom_meta( $meta ){
//do whatever you want with $meta
return $meta;
}

igm_prepare_meta

Similar to the previous filter, but runs a bit after.

add_filter( 'igm_prepare_meta', 'igm_custom_meta', 1 );
function igm_custom_meta( $meta ){
//do whatever you want with $meta
return $meta;
}

More information and examples soon.

igm_map_before

igm_map_after

igm_mapbox_classes

Practical Examples

Here are a few examples of custom addons developed using the filters above. Most of these will also add extra fields/options to the maps.

https://github.com/carmoreira/igm-products-integration

https://github.com/carmoreira/igm-charities-integration

Posted by Carlos Moreira

Lead developer of Interactive Geo Maps plugin.