Advertisement
borlabs

Content Blocker

Oct 14th, 2021
1,381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. // Start buffer
  3. ob_start();
  4. ?>
  5. <iframe class="w-100" src="https://www.youtube-nocookie.com/embed/<?php the_field('media_youtube_id'); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  6. <?php
  7. // Get buffer
  8. $iframeCode = ob_get_contents();
  9. // End buffer
  10. ob_end_clean();
  11. // Output blocked code and Content Blocker preview
  12. echo do_shortcode('[borlabs-cookie type="content-blocker" id="youtube" title="YouTube"]' . $iframeCode . '[/borlabs-cookie]');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement