-
-
Save leotsem/7486827 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
/** | |
* Add a X-XSS-Protection = 0 header for post previews to allow | |
* Webkit browsers to render iframe and flash objects. | |
* @see: http://core.trac.wordpress.org/ticket/20148 | |
* | |
* @param $headers array Already added header items. | |
* @param $object WP The query variables. | |
* | |
* @return array | |
*/ | |
function send_no_xss_protection_header( $headers, $object ) { | |
$headers['X-XSS-Protection'] = 0; | |
return $headers; | |
} | |
add_filter( 'wp_headers', 'send_no_xss_protection_header', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment