gsarig / ootb-openstreetmap

A map block for WordPress' Gutenberg Editor which uses OpenStreetMap and Leaflet.js. It needs no API keys and works out of the box. Benefiting from Gutenberg’s potential, the plugin tries a different take on how to add your locations on the map and rethinks a few things, UX-wise. Install it from https://wordpress.org/plugins/ootb-openstreetmap/
29 stars 2 forks source link

Complianz with Out of the Block: OpenStreetMap #32

Closed n-langle closed 11 months ago

n-langle commented 1 year ago

Hi,

I recently open an issue on Complianz repo. We detected an error in ootb-openstreetmap when OpenStreetMap is blocked by Complianz.

Is it possible to support Complianz on your side as recommended by Complianz developers ?

WordPress: 5.9.7 Complianz Privacy Suite (GDPR/CCPA) premium multisite: 6.4.3 Out of the Block: OpenStreetMap: 2.4.0

Best regards

gsarig commented 11 months ago

Hi @n-langle I did a quick test locally, and saw that if you add data-category="functional" to the script, it will load. To do so, you can paste this to your theme's functions.php:

function add_data_attribute($tag, $handle) {
    if ('ootb-openstreetmap' !== $handle) {
        return $tag;
    }
    return str_replace('<script ', '<script data-category="functional" ', $tag);
}
add_filter('script_loader_tag', 'add_data_attribute', 10, 2);

Alternatively, if you prefer to not touch the code, you could follow the instructions of this topic.

n-langle commented 11 months ago

Hi @gsarig, Thanks for your response, I will test that.