Filter oembeds tags to modify iframe attributes

By default, when putting another WP url inside a post/page, it oEmbeds it and produces a blockquote and iframe code with the default in the front-end:

<iframe class=”wp-embedded-content” sandbox=”allow-scripts” security=”restricted” ….></iframe>

What is the best filter to use to modify the iframe produced in the front-end, for example, we want it to allow-same-origin attribute for sandbox

<iframe class=”wp-embedded-content” sandbox=”allow-scripts allow-same-origin” security=”restricted” ….></iframe>

Read more here:: Filter oembeds tags to modify iframe attributes

Leave a Reply

Your email address will not be published. Required fields are marked *