Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
//* Do NOT include the opening php tag
//* Add X-Frame-Options: This will keep people from using any page on our website in an IFRAME
//* https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
function add_header_xframe() {
header( 'X-Frame-Options: DENY' );
}
add_action( 'send_headers', 'add_header_xframe' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.