PATH:
home
/
urbaoubp
/
gns.pitgradnja.com
/
wp-content
/
plugins
/
complianz-gdpr
/
integrations
/
plugins
<?php defined( 'ABSPATH' ) or die( "you do not have acces to this page!" ); if ( cmplz_uses_thirdparty('google-maps') ) { function cmplz_is_adverts_ad_page(){ global $post; if ( $post && has_shortcode($post->post_content, 'adverts_add')) { return true; } return false; } function cmplz_is_adverts_list_page(){ global $post; if ( $post && has_shortcode($post->post_content, 'adverts_list')) { return true; } return false; } function cmplz_is_adverts_mal_page(){ global $post; if ( $post && has_shortcode($post->post_content, 'adverts_mal_map')) { return true; } return false; } function cmplz_wpadverts_reload_after_consent() { ?> <script> if ( document.querySelector('.wpadverts-mal-full-map-container') ) { document.addEventListener('cmplz_status_change', function (e) { if (e.detail.category === 'marketing' && e.detail.value==='allow') { location.reload(); } }); document.addEventListener('cmplz_status_change_service', function (e) { if ( e.detail.value ) { location.reload(); } }); } </script> <?php } add_action( 'wp_footer', 'cmplz_wpadverts_reload_after_consent' ); function cmplz_custom_wpadverts_googlemaps_script( $tags ) { if( is_singular( "advert" ) ) { // if the map is on the ad details page, use map-single $tags[] = array( 'name' => 'google-maps', 'category' => 'marketing', 'placeholder' => 'google-maps', 'urls' => array( 'maps.googleapis.com', 'map-single.js', ), 'enable_placeholder' => '1', 'placeholder_class' => 'adverts-single-grid-details', 'enable_dependency' => '1', 'dependency' => [ //'wait-for-this-script' => 'script-that-should-wait' 'maps.googleapis.com' => 'map-single.js', ], ); return $tags; } else if ( cmplz_is_adverts_list_page() && !cmplz_is_adverts_mal_page() ){ // adverts list page without MAL shortcode, block maps api and autocomplete script $tags[] = array( 'name' => 'google-maps', 'category' => 'marketing', 'placeholder' => 'google-maps', 'urls' => array( 'maps.googleapis.com', 'search-places.js' ), 'enable_placeholder' => '0', 'placeholder_class' => 'wpadverts-mal-map', 'enable_dependency' => '1', 'dependency' => [ //'wait-for-this-script' => 'script-that-should-wait' 'maps.googleapis.com' => 'search-places.js', ], ); return $tags; } else if ( cmplz_is_adverts_ad_page() ){ // adverts add page, block maps api and autocomplete script $tags[] = array( 'name' => 'google-maps', 'category' => 'marketing', 'placeholder' => 'google-maps', 'urls' => array( 'maps.googleapis.com', 'locate-autocomplete.js', ), 'enable_placeholder' => '0', 'placeholder_class' => 'wpadverts-mal-map', 'enable_dependency' => '1', 'dependency' => [ //'wait-for-this-script' => 'script-that-should-wait' 'maps.googleapis.com' => 'locate-autocomplete.js', ], ); return $tags; } else { // other page, the multi marker map. possibly combined with adverts_list shortcode // in this case we reload after consent, due to multiple dependencies. $tags[] = array( 'name' => 'google-maps', 'category' => 'marketing', 'placeholder' => 'google-maps', 'urls' => array( 'maps.googleapis.com', 'map-icons.js', 'infobox.js', 'map-complete.js', 'wpadverts_mal_locate', 'search-places.js', ), 'enable_placeholder' => '1', 'placeholder_class' => 'wpadverts-mal-map', 'enable_dependency' => '1', 'dependency' => [ //'wait-for-this-script' => 'script-that-should-wait' 'maps.googleapis.com' => 'map-icons.js', 'map-icons.js' => 'infobox.js', 'infobox.js' => 'map-complete.js', ], ); return $tags; } } add_filter( 'cmplz_known_script_tags', 'cmplz_custom_wpadverts_googlemaps_script' ); function cmplz_wpadverts_single_css() { if( is_singular( "advert" ) ) { ?> <style> .single-advert .cmplz-placeholder-1 { height: 300px; } </style> <?php } } add_action( 'wp_footer', 'cmplz_wpadverts_single_css' ); }
[-] volocation.php
[edit]
[-] clarity.php
[edit]
[-] ultimate-addons-elementor.php
[edit]
[-] themify-builder.php
[edit]
[-] omgf.php
[edit]
[-] wp-google-maps.php
[edit]
[-] activecampaign.php
[edit]
[-] wp-google-maps-widget.php
[edit]
[-] caos-host-analytics-local.php
[edit]
[-] index.php
[edit]
[-] pixelyoursite.php
[edit]
[-] amp.php
[edit]
[-] content-views-plugin.php
[edit]
[-] weglot-translate.php
[edit]
[-] wpadverts.php
[edit]
[-] tidio-live-chat.php
[edit]
[-] woocommerce.php
[edit]
[-] contact-form-7.php
[edit]
[-] yotu-wp.php
[edit]
[-] sumo.php
[edit]
[-] pixelyoursite-bing.php
[edit]
[-] woocommerce-variation-swatches.php
[edit]
[-] happyforms.php
[edit]
[-] advanced-nocaptcha-recaptcha.php
[edit]
[-] pixelyoursite-pinterest.php
[edit]
[-] bb-powerpack.php
[edit]
[-] user-registration.php
[edit]
[-] simple-business-directory.php
[edit]
[-] forminator-addon-registration.php
[edit]
[-] trustpulse.php
[edit]
[-] google-site-kit.php
[edit]
[-] novo-map.php
[edit]
[-] buttonizer.php
[edit]
[-] primavera.php
[edit]
[-] omnisend.php
[edit]
[-] facebook-for-wordpress.php
[edit]
[-] hcaptcha.php
[edit]
[-] rate-my-post.php
[edit]
[-] wp-store-locator.php
[edit]
[-] burst-statistics.php
[edit]
[-] welaunch-store-locator.php
[edit]
[-] google-analytics-dashboard-for-wp.php
[edit]
[-] pixel-caffeine.php
[edit]
[-] uncode.php
[edit]
[-] easy-liveblogs.php
[edit]
[-] generatepress-maps.php
[edit]
[-] colibriwp.php
[edit]
[-] disable-and-remove-google-fonts.php
[edit]
[-] advanced-ads.php
[edit]
[-] invisible-recaptcha.php
[edit]
[-] gravity-forms.php
[edit]
[-] qtranslate.php
[edit]
[-] jetpack.php
[edit]
[-] elementor.php
[edit]
[-] lead-forensics.php
[edit]
[-] wp-google-map-plugin.php
[edit]
[-] woocommerce-google-analytics-pro.php
[edit]
[-] superfly-menu.php
[edit]
[-] wp-donottrack.php
[edit]
[-] greenshift.php
[edit]
[-] presto-player.php
[edit]
[-] lazy-loader.php
[edit]
[-] google-tagmanager-for-wordpress.php
[edit]
[-] wpforms.php
[edit]
[-] avada-maps.php
[edit]
[-] mailchimp-woocommerce.php
[edit]
[-] theeventscalendar.php
[edit]
[-] acf.php
[edit]
[-] facebook-for-woocommerce.php
[edit]
[+]
..
[-] forminator-addon-class-v2.php
[edit]
[-] nudgify.php
[edit]
[-] agile-store-locator.php
[edit]
[-] divi-plugin.php
[edit]
[-] addtoany.php
[edit]
[-] woocommerce-google-analytics-integration.php
[edit]
[-] super-socializer.php
[edit]
[-] embed-google-fonts.php
[edit]
[-] meks-easy-maps.php
[edit]
[-] flexible-map.php
[edit]
[-] map-multi-marker.php
[edit]
[-] citadela-directory.php
[edit]
[-] wp-consent-api.php
[edit]
[-] olympus-google-fonts.php
[edit]
[-] podcast-player.php
[edit]
[-] pixelyoursite-pro.php
[edit]
[-] so-widgets-bundle.php
[edit]
[-] thrive.php
[edit]
[-] easy-fancybox.php
[edit]
[-] osm.php
[edit]
[-] monsterinsights.php
[edit]
[-] forminator.php
[edit]
[-] user-registration-pro.php
[edit]
[-] google-maps-easy.php
[edit]
[-] geo-my-wp.php
[edit]
[-] use-any-font.php
[edit]
[-] g1-gmaps.php
[edit]
[-] wp-video-lightbox.php
[edit]
[-] forminator-addon-class.php
[edit]
[-] divi.php
[edit]
[-] wp-rocket.php
[edit]
[+]
elementor-pro
[-] beehive.php
[edit]
[-] local-google-fonts.php
[edit]
[-] beaver-builder.php
[edit]