Last active
November 3, 2025 08:55
-
-
Save tonai126/a3ab2734ec0c10d9be9fcb29af17cc6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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