Support Forum Support Forum GDPR Cookie Compliance Iframe Blocker – Divi builder.

Topic Resolution: Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Premium
    AvatarBent Petersen
    July 15, 2020 @ 11:52 am

    We bought the GDPR Cookie Compliance as we though the Iframe Blocker would work on our DIVI Map modules as the disclaimer stating it only worked with default editor was not present.

    Is there any plans for the Iframe Blocker to be implimented for Divi Builder?

    Moove AgencyMoove Agency
    July 28, 2020 @ 8:10 am

    Hi Bent,

    Thanks for using our plugins.

    We just checked your site, it seems the DIVI Map uses JavaScript maps and not iFrames to create the map.
    You can add the following code snippet to your functions.php to hide the map until the user accepts the “Third Party” cookies:

    function gpdr_cc_iframe_extension() {
    	if ( function_exists( 'gdpr_cookie_is_accepted' ) ) {
    		/* supported types: 'strict', 'thirdparty', 'advanced' */
    		if ( ! gdpr_cookie_is_accepted( 'thirdparty' ) ) {
    			?>
    			<style>
    				.et_pb_map {
    					display: none;
    				}
    			</style>
    			<?php
    		}
    	}
    }
    add_action( 'wp_footer', 'gpdr_cc_iframe_extension' );
    add_action( 'gdpr_force_reload', '__return_true' );

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.