• Using Geo Mashup, we are adding the map functionality on an existing multilingual site.
    We need to initially hide the markers with a certain taxonomy term, and we can do this by using GeoMashup.addAction( ‘loadedMap’, function () { … } )
    However. GeoMashup.opts.term_properties.(taxonomy).terms has no slugs, so we have to specify the term by its id or by its name.
    Since both id and name are not identical among localized sub-sites, using these requires a different javascript file for each language.
    On the other hand, the slug is common for all languages and we can unify the javascript file when using the slug.
    Our solution: In the geo-mashup-map-frame.php, we decode the content of GeoMashupRenderMap::map_script( ‘geo-mashup’ ), add the slug for each term, and encode the map_data again.
    Isn’t it ridiculous?

    https://wordpress.org/plugins/geo-mashup/

  • The topic ‘Would you add the slug property for each term?’ is closed to new replies.