Created
January 28, 2015 07:26
-
-
Save Zenger/f516840db1538f743fb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Plugin Name: X-Frame-Options | |
Description: Simple X-Frame-Options Manager | |
Author: Zenger | |
Author URI: http://1theme.com/ | |
*/ | |
$setting = "http://themeforest.net/"; | |
if ( version_compare(PHP_VERSION, '5.3.0', '>=') ) { | |
function sxfom_remove() | |
{ | |
header_remove("X-FRAME-OPTIONS"); | |
header_remove("X-Frame-Options"); | |
} | |
add_action('send_headers' , 'sxfom_remove'); | |
header_remove("X-FRAME-OPTIONS"); | |
/* if ($setting == "same") | |
{ | |
@header("X-FRAME-OPTIONS", "SAMEORIGIN"); | |
} | |
else if ($setting == "deny") | |
{ | |
@header("X-FRAME-OPTIONS", "DENY"); | |
} | |
else | |
{ | |
@header("X-FRAME-OPTIONS", "Allow-From SAMEORIGIN,$same"); | |
} */ | |
} | |
//@header("X-FRAME-OPTIONS", "Allow-From http://themeforest.net/"); | |
//header_remove("X-FRAME-OPTIONS"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment