Skip to main content

8.5.35

🚀 Features / Improvements

  • Posts: Added mapsvg_format_post_data filter in PHP, that allows modifying WP Post data returned to mapsvg front-end. Add your taxonomies or anything else. Example:
add_filter('mapsvg_format_post_data', 'add_custom_taxonomy_to_mapsvg', 10, 2);

function add_custom_taxonomy_to_mapsvg($post) {
// Get terms from a custom taxonomy
$terms = get_the_terms($post->ID, 'your_taxonomy_name');

if ($terms && !is_wp_error($terms)) {
// Add taxonomy terms to the post data
$post->taxonomy_terms = array_map(function($term) {
return [
'id' => $term->term_id,
'name' => $term->name,
'slug' => $term->slug
];
}, $terms);
}

return $post;
}
  • Upgrades: Improved upgrading scripts from old MapSVG versions

🐞 Fixes

  • Conflicts: fixed incompatibilities with some WP themes and plugins due to the flush_rewrite_rules() use.