Support Forum › Support Forum › GDPR Cookie Compliance › Iframe not loading correctly with Iframe blocker hook
- AuthorPosts
July 21, 2021 @ 11:24 amHi,
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 AgencyJuly 23, 2021 @ 12:21 pmHi 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.
AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)The topic ‘Iframe not loading correctly with Iframe blocker hook’ is closed to new replies.