PATH:
home
/
urbaoubp
/
gns.pitgradnja.com
/
wp-content
/
plugins
/
complianz-gdpr
/
integrations
/
plugins
<?php defined( 'ABSPATH' ) or die(); /** * Filter Custom method from Thrive * * @param string $html * * @return mixed|null */ function cmplz_thrive_page_content_cookieblocker( $html ) { if ( ! is_admin() && ! cmplz_is_pagebuilder_preview() ) { $html = COMPLIANZ::$cookie_blocker->replace_tags( $html ); } return $html; } add_filter( 'tve_landing_page_content', 'cmplz_thrive_page_content_cookieblocker' ); /** * Whitelist youtube and video from being blocked, in the text/templates scripts of the Trhive quiz builder * * @param $tags * * @return mixed */ function cmplz_thrive_whitelist( $tags ) { $tags[] = '//www.youtube.com/embed/<#='; $tags[] = '//player.vimeo.com/video/<#='; return $tags; } add_filter( 'cmplz_whitelisted_script_tags', 'cmplz_thrive_whitelist' ); /** * Add inline css, as Thrive removes it * * @param string $html * * @return string */ function cmplz_thrive_inline_css( $html ) { $html .= '<style> .cmplz-hidden{display:none !important;}</style>'; return $html; } add_filter( "cmplz_banner_html", 'cmplz_thrive_inline_css' ); /** * Filter cookie blocker output */ function cmplz_thrive_cookieblocker( $output ) { $iframe_pattern = '/thrv_responsive_video[ |\"][^>]+?data-url="(.*?)">/is'; if ( preg_match_all( $iframe_pattern, $output, $matches, PREG_PATTERN_ORDER ) ) { foreach ( $matches[0] as $key => $total_match ) { $placeholder = ''; // Determine if it's YouTube or Vimeo based on the URL in the data-url attribute if ( strpos( $matches[1][ $key ], 'youtube.com' ) !== false && cmplz_uses_thirdparty( 'youtube' ) ) { if ( cmplz_use_placeholder( 'youtube' ) && isset( $matches[1][ $key ] ) ) { $youtube_url = $matches[1][ $key ]; $placeholder = 'data-placeholder-image="' . cmplz_placeholder( false, stripcslashes( $youtube_url ) ) . '" '; } $new_match = str_replace( 'data-url', $placeholder . ' data-category="marketing" data-service="youtube" data-src-cmplz', $total_match ); } elseif ( strpos( $matches[1][ $key ], 'vimeo.com' ) !== false && cmplz_uses_thirdparty( 'vimeo' ) ) { if ( cmplz_use_placeholder( 'vimeo' ) && isset( $matches[1][ $key ] ) ) { $vimeo_url = $matches[1][ $key ]; $placeholder = 'data-placeholder-image="' . cmplz_placeholder( false, stripcslashes( $vimeo_url ) ) . '" '; } $new_match = str_replace( 'data-url', $placeholder . ' data-category="statistics" data-service="vimeo" data-src-cmplz', $total_match ); } else { // If it's neither Vimeo nor YouTube, skip this iteration and proceed to the next match continue; } $new_match = str_replace( 'thrv_responsive_video', 'thrv_responsive_video cmplz-placeholder-element', $new_match ); $output = str_replace( $total_match, $new_match, $output ); } } return $output; } add_filter( 'cmplz_cookie_blocker_output', 'cmplz_thrive_cookieblocker' ); /** * @param string $target * @param string $total_match * * @return string */ function cmplz_thrive_data_target( $target, $total_match ) { // Look for thrive class in iframe here if ( strpos( $total_match, 'data-url' ) !== false && ( cmplz_uses_thirdparty( 'youtube' ) || cmplz_uses_thirdparty( 'vimeo' ) ) ) { return 'data-url'; } return $target; } add_filter( 'cmplz_data_target', 'cmplz_thrive_data_target', 100, 2 ); /** * Initialize thrive youtube iframe * */ function cmplz_thrive_initDomContentLoaded() { if ( ! cmplz_uses_thirdparty( 'youtube' ) ) { return; } ob_start(); ?> <script> document.addEventListener("cmplz_run_after_all_scripts", cmplz_thrive_fire_domContentLoadedEvent); function cmplz_thrive_fire_domContentLoadedEvent() { dispatchEvent(new Event('load')); } </script> <?php $script = ob_get_clean(); $script = str_replace( array( '<script>', '</script>' ), '', $script ); wp_add_inline_script( 'cmplz-cookiebanner', $script ); } add_action( 'wp_enqueue_scripts', 'cmplz_thrive_initDomContentLoaded', PHP_INT_MAX );
[-] 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]