Support Forum Support Forum GDPR Cookie Compliance Iframe not loading correctly with Iframe blocker hook

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 21, 2021 @ 11:24 am

    Hi,

    I am using the iframe blocker to block video iframes in a custom post template. In order to achieve this, I have used the following function:
    apply_filters(‘gdpr_iframe_blocker_filter’, $iframe);
    where the $iframe is a string containing the iframe html element.

    When cookies are not accepted, the iframe blocker works alright, but if the cookies were already accepted, once the page loads the blocker appears for a few seconds before reloading and showing the actual iframe.

    I hope you can help me fix this issue.

    Moove Agency
    July 23, 2021 @ 12:21 pm

    Hi there,

    Thanks for using our plugins.

    You can add the following code snippet to functions.php

    add_filter( 'gdpr_init_script_delay', 'gdpr_delay_script_execution', 20, 1 );
    				function gdpr_delay_script_execution( $ms ) {
    					return 0;
    				}

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Iframe not loading correctly with Iframe blocker hook’ is closed to new replies.