Puede personalizar los datos de cada ubicación antes de que se muestren en el mapa o en la lista. Esto puede ser útil si desea mostrar iconos de marcador específicos para determinadas ubicaciones.
PHP
add_filter('oum_location_data', function ( $location_data, $post_id ) {
// Example: Change marker icon based on custom logic
if ( $post_id == 123 ) {
$location_data['icon'] = 'https://example.com/custom-marker.png';
}
// You can modify any property of $location_data:
// - icon: marker icon URL (works for map markers and list view)
// - title, lat, lng, zoom, types, post_id, address, text, image, audio, video, custom_fields, votes, etc.
// - content: plain text for the map marker search only (not the popup HTML). Full bubble markup is built
// on the server and can be changed with the oum_location_bubble_content filter (or oum_location_bubble_image).
return $location_data;
}, 10, 2);