]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/functions.php
Wordpress 3.1.3
[autoinstalls/wordpress.git] / wp-includes / functions.php
index 65ee33eaf408dff3db58157fd0801e3a38f69350..34fe1132ad384401140d98de50b679398f66558b 100644 (file)
@@ -4302,7 +4302,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
        }
 
        foreach ( $all_headers as $field => $regex ) {
-               preg_match( '/^[ \t\/*#]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
+               preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
                if ( !empty( ${$field} ) )
                        ${$field} = _cleanup_header_comment( ${$field}[1] );
                else
@@ -4482,4 +4482,16 @@ function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = ar
        return false;
 }
 
+/**
+ * Send a HTTP header to limit rendering of pages to same origin iframes.
+ *
+ * @link https://developer.mozilla.org/en/the_x-frame-options_response_header
+ *
+ * @since 3.1.3
+ * @return none
+ */
+function send_frame_options_header() {
+       @header( 'X-Frame-Options: SAMEORIGIN' );
+}
+
 ?>