Vous pouvez personnaliser les données de chaque lieu avant qu'elles ne soient affichées sur la carte ou dans la liste. Cela peut s'avérer utile si vous souhaitez afficher des icônes de repérage spécifiques pour certains lieux.
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);