Skip to content

Instantly share code, notes, and snippets.

@rickrduncan
Created November 30, 2015 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickrduncan/83459869fa46cc67aa47 to your computer and use it in GitHub Desktop.
Save rickrduncan/83459869fa46cc67aa47 to your computer and use it in GitHub Desktop.
<?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