-
-
Save leotsem/7486827 to your computer and use it in GitHub Desktop.
Revisions
-
leotsem revised this gist
Nov 15, 2013 . 1 changed file with 1 addition and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,15 +9,7 @@ * @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 ); -
ocean90 revised this gist
Sep 5, 2012 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,9 +9,15 @@ * @return array */ function send_no_xss_protection_header( $headers, $object ) { if ( ! empty( $object->query_vars['preview'] ) && ! empty( $object->query_vars['p'] ) && wp_get_referer() && wp_get_referer() == sprintf( admin_url( 'post.php?post=%d&action=edit' ), $object->query_vars['p'] ) ) $headers['X-XSS-Protection'] = 0; return $headers; } add_filter( 'wp_headers', 'send_no_xss_protection_header', 10, 2 ); -
ocean90 created this gist
Sep 4, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ /** * 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 ) { if ( ! empty( $object->query_vars['preview'] ) ) $headers['X-XSS-Protection'] = 0; return $headers; } add_filter( 'wp_headers', 'send_no_xss_protection_header', 10, 2 );