Skip to content

Instantly share code, notes, and snippets.

@tonai126
Last active November 3, 2025 08:55
Show Gist options
  • Select an option

  • Save tonai126/a3ab2734ec0c10d9be9fcb29af17cc6f to your computer and use it in GitHub Desktop.

Select an option

Save tonai126/a3ab2734ec0c10d9be9fcb29af17cc6f to your computer and use it in GitHub Desktop.
<?php
/**
* Ultimate Maps Integration for Complianz GDPR
*/
defined( 'ABSPATH' ) || die( 'You do not have access to this page!' );
/**
* Register Ultimate Maps scripts with Complianz.
*
* @param array $tags Existing array of script tags.
* @return array Modified array including Ultimate Maps configuration.
*/
function cmplz_ultimate_maps_script( $tags ) {
$tags[] = array(
'name' => 'Ultimate-Maps',
'category' => 'marketing',
'placeholder' => 'openstreetmaps',
'urls' => array(
'frontend.maps.js',
'TileLayer.js',
),
'enable_placeholder' => '1',
'placeholder_class' => 'ums_map_opts',
'enable_dependency' => '0',
);
return $tags;
}
add_filter( 'cmplz_known_script_tags', 'cmplz_ultimate_maps_script' );
/**
* @param array $tags
*
* @return array
*/
function cmplz_ultimate_map_whitelist( $tags ) {
$tags[] = 'umsBaseMap'; //'string from inline script or source that should be whitelisted'
return $tags;
}
add_filter( 'cmplz_whitelisted_script_tags', 'cmplz_ultimate_map_whitelist');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment