8.5.37
🐞 Fixes
- Link tags: fixed inactive inline
<a>...</a>
links in a SVG file - Activation: fixed activation issues for MapSVG-Lite version of the plugin.
<a>...</a>
links in a SVG fileThis is useful when you are iterating over an array. You can pass current array item into the shortcode using this
:
{{shortcode_inline ...}}
rendering which was triggering errors on some servers due to the incorrect Content-type being set as json
. Now the content type is set as text/plain
.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;
}
flush_rewrite_rules()
use.