Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(wersja 21273)
+++ wp-includes/pluggable.php	(kopia robocza)
@@ -878,7 +878,7 @@
 	if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
 		status_header($status); // This causes problems on IIS and some FastCGI setups
 
-	header("Location: $location", true, $status);
+	wp_header( "Location: $location", true, $status );
 }
 endif;
 
@@ -1737,3 +1737,21 @@
 	return $r;
 }
 endif;
+
+if ( !function_exists( 'wp_header' ) ) :
+ /**
+ * Sends HTTP Header to the client
+ *
+ * @since 3.5
+ *
+ * @param string $header The header string.
+ * @param boolean $replace True if header should replace previous header, false if not. Default is true.
+ * @param int $http_response_code Force the HTTP response code to given value if provided. Default is null.
+ */
+function wp_header( $header, $replace = true, $http_response_code = null ) {
+	if ( !empty( $http_response_code ) )
+		@header( $header, $replace, (int) $http_response_code );
+	else
+		@header( $header, $replace );
+}
+endif;
Index: wp-trackback.php
===================================================================
--- wp-trackback.php	(wersja 21273)
+++ wp-trackback.php	(kopia robocza)
@@ -17,7 +17,7 @@
  * @param string $error_message Error message if an error occurred
  */
 function trackback_response($error = 0, $error_message = '') {
-	header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
+	wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
 	if ($error) {
 		echo '<?xml version="1.0" encoding="utf-8"?'.">\n";
 		echo "<response>\n";
@@ -82,7 +82,7 @@
 }
 
 if ( !empty($tb_url) && !empty($title) ) {
-	header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
+	wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
 
 	if ( !pings_open($tb_id) )
 		trackback_response(1, 'Sorry, trackbacks are closed for this item.');
Index: wp-admin/network/sites.php
===================================================================
--- wp-admin/network/sites.php	(wersja 21273)
+++ wp-admin/network/sites.php	(kopia robocza)
@@ -202,7 +202,7 @@
 			check_admin_referer( 'confirm' );
 			if ( !headers_sent() ) {
 				nocache_headers();
-				header( 'Content-Type: text/html; charset=utf-8' );
+				wp_header( 'Content-Type: text/html; charset=utf-8' );
 			}
 			if ( $current_site->blog_id == $id )
 				wp_die( __( 'You are not allowed to change the current site.' ) );
Index: wp-admin/admin-header.php
===================================================================
--- wp-admin/admin-header.php	(wersja 21273)
+++ wp-admin/admin-header.php	(kopia robocza)
@@ -6,7 +6,7 @@
  * @subpackage Administration
  */
 
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+wp_header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
 if ( ! defined( 'WP_ADMIN' ) )
 	require_once( './admin.php' );
 
Index: wp-admin/upgrade.php
===================================================================
--- wp-admin/upgrade.php	(wersja 21273)
+++ wp-admin/upgrade.php	(kopia robocza)
@@ -43,7 +43,7 @@
 else
 	$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
 
-@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
+wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
Index: wp-admin/press-this.php
===================================================================
--- wp-admin/press-this.php	(wersja 21273)
+++ wp-admin/press-this.php	(kopia robocza)
@@ -11,7 +11,7 @@
 /** WordPress Administration Bootstrap */
 require_once('./admin.php');
 
-header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 
 if ( ! current_user_can('edit_posts') )
 	wp_die( __( 'Cheatin&#8217; uh?' ) );
Index: wp-admin/setup-config.php
===================================================================
--- wp-admin/setup-config.php	(wersja 21273)
+++ wp-admin/setup-config.php	(kopia robocza)
@@ -86,7 +86,7 @@
 function display_header() {
 	global $wp_version;
 
-	header( 'Content-Type: text/html; charset=utf-8' );
+	wp_header( 'Content-Type: text/html; charset=utf-8' );
 ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
Index: wp-admin/install.php
===================================================================
--- wp-admin/install.php	(wersja 21273)
+++ wp-admin/install.php	(kopia robocza)
@@ -51,7 +51,7 @@
  * @subpackage Installer
  */
 function display_header() {
-	header( 'Content-Type: text/html; charset=utf-8' );
+	wp_header( 'Content-Type: text/html; charset=utf-8' );
 ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
Index: wp-admin/async-upload.php
===================================================================
--- wp-admin/async-upload.php	(wersja 21273)
+++ wp-admin/async-upload.php	(kopia robocza)
@@ -23,7 +23,7 @@
 unset($current_user);
 require_once('./admin.php');
 
-header('Content-Type: text/html; charset=' . get_option('blog_charset'));
+wp_header('Content-Type: text/html; charset=' . get_option('blog_charset'));
 
 if ( !current_user_can('upload_files') )
 	wp_die(__('You do not have permission to upload files.'));
Index: wp-admin/load-styles.php
===================================================================
--- wp-admin/load-styles.php	(wersja 21273)
+++ wp-admin/load-styles.php	(kopia robocza)
@@ -132,17 +132,17 @@
 	}
 }
 
-header('Content-Type: text/css');
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
+wp_header( 'Content-Type: text/css' );
+wp_header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT' );
+wp_header( "Cache-Control: public, max-age=$expires_offset" );
 
 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
-	header('Vary: Accept-Encoding'); // Handle proxies
+	wp_header( 'Vary: Accept-Encoding' ); // Handle proxies
 	if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-		header('Content-Encoding: deflate');
+		wp_header( 'Content-Encoding: deflate' );
 		$out = gzdeflate( $out, 3 );
 	} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-		header('Content-Encoding: gzip');
+		wp_header( 'Content-Encoding: gzip' );
 		$out = gzencode( $out, 3 );
 	}
 }
Index: wp-admin/load-scripts.php
===================================================================
--- wp-admin/load-scripts.php	(wersja 21273)
+++ wp-admin/load-scripts.php	(kopia robocza)
@@ -139,17 +139,17 @@
 	$out .= get_file($path) . "\n";
 }
 
-header('Content-Type: application/x-javascript; charset=UTF-8');
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
+wp_header( 'Content-Type: application/x-javascript; charset=UTF-8' );
+wp_header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT' );
+wp_header( "Cache-Control: public, max-age=$expires_offset" );
 
 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
-	header('Vary: Accept-Encoding'); // Handle proxies
+	wp_header( 'Vary: Accept-Encoding' ); // Handle proxies
 	if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-		header('Content-Encoding: deflate');
+		wp_header( 'Content-Encoding: deflate' );
 		$out = gzdeflate( $out, 3 );
 	} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-		header('Content-Encoding: gzip');
+		wp_header( 'Content-Encoding: gzip' );
 		$out = gzencode( $out, 3 );
 	}
 }
Index: wp-admin/maint/repair.php
===================================================================
--- wp-admin/maint/repair.php	(wersja 21273)
+++ wp-admin/maint/repair.php	(kopia robocza)
@@ -9,7 +9,7 @@
 
 require_once('../../wp-load.php');
 
-header( 'Content-Type: text/html; charset=utf-8' );
+wp_header( 'Content-Type: text/html; charset=utf-8' );
 ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(wersja 21273)
+++ wp-admin/admin-ajax.php	(kopia robocza)
@@ -29,8 +29,8 @@
 /** Load Ajax Handlers for WordPress Core */
 require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
 
-@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
-@header( 'X-Robots-Tag: noindex' );
+wp_header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
+wp_header( 'X-Robots-Tag: noindex' );
 
 send_nosniff_header();
 
Index: wp-admin/includes/image-edit.php
===================================================================
--- wp-admin/includes/image-edit.php	(wersja 21273)
+++ wp-admin/includes/image-edit.php	(kopia robocza)
@@ -202,13 +202,13 @@
 
 	switch ( $mime_type ) {
 		case 'image/jpeg':
-			header('Content-Type: image/jpeg');
+			wp_header( 'Content-Type: image/jpeg' );
 			return imagejpeg($image, null, 90);
 		case 'image/png':
-			header('Content-Type: image/png');
+			wp_header( 'Content-Type: image/png' );
 			return imagepng($image);
 		case 'image/gif':
-			header('Content-Type: image/gif');
+			wp_header( 'Content-Type: image/gif' );
 			return imagegif($image);
 		default:
 			return false;
Index: wp-admin/includes/export.php
===================================================================
--- wp-admin/includes/export.php	(wersja 21273)
+++ wp-admin/includes/export.php	(kopia robocza)
@@ -36,9 +36,9 @@
 	if ( ! empty($sitename) ) $sitename .= '.';
 	$filename = $sitename . 'wordpress.' . date( 'Y-m-d' ) . '.xml';
 
-	header( 'Content-Description: File Transfer' );
-	header( 'Content-Disposition: attachment; filename=' . $filename );
-	header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
+	wp_header( 'Content-Description: File Transfer' );
+	wp_header( 'Content-Disposition: attachment; filename=' . $filename );
+	wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
 
 	if ( 'all' != $args['content'] && post_type_exists( $args['content'] ) ) {
 		$ptype = get_post_type_object( $args['content'] );
Index: wp-admin/includes/ajax-actions.php
===================================================================
--- wp-admin/includes/ajax-actions.php	(wersja 21273)
+++ wp-admin/includes/ajax-actions.php	(kopia robocza)
@@ -93,11 +93,11 @@
 	}
 
 	if ( isset($_GET['test']) ) {
-		header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
-		header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
-		header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
-		header( 'Pragma: no-cache' );
-		header('Content-Type: application/x-javascript; charset=UTF-8');
+		wp_header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
+		wp_header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
+		wp_header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
+		wp_header( 'Pragma: no-cache' );
+		wp_header( 'Content-Type: application/x-javascript; charset=UTF-8' );
 		$force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP );
 		$test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."';
 
@@ -108,10 +108,10 @@
 			if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) )
 				wp_die( -1 );
 			if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-				header('Content-Encoding: deflate');
+				wp_header( 'Content-Encoding: deflate' );
 				$out = gzdeflate( $test_str, 1 );
 			} elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-				header('Content-Encoding: gzip');
+				wp_header( 'Content-Encoding: gzip' );
 				$out = gzencode( $test_str, 1 );
 			} else {
 				wp_die( -1 );
Index: wp-admin/customize.php
===================================================================
--- wp-admin/customize.php	(wersja 21273)
+++ wp-admin/customize.php	(kopia robocza)
@@ -39,7 +39,7 @@
 do_action( 'customize_controls_enqueue_scripts' );
 
 // Let's roll.
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 
 wp_user_settings();
 _wp_admin_html_begin();
Index: wp-admin/media-upload.php
===================================================================
--- wp-admin/media-upload.php	(wersja 21273)
+++ wp-admin/media-upload.php	(kopia robocza)
@@ -24,7 +24,7 @@
 wp_enqueue_style('imgareaselect');
 wp_enqueue_script( 'media-gallery' );
 
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
 
 // IDs should be integers
 $ID = isset($ID) ? (int) $ID : 0;
Index: wp-includes/class-wp.php
===================================================================
--- wp-includes/class-wp.php	(wersja 21273)
+++ wp-includes/class-wp.php	(kopia robocza)
@@ -377,7 +377,7 @@
 		if ( ! empty( $status ) )
 			status_header( $status );
 		foreach( (array) $headers as $name => $field_value )
-			@header("{$name}: {$field_value}");
+			wp_header( "{$name}: {$field_value}" );
 
 		if ( $exit_required )
 			exit();
Index: wp-includes/class-IXR.php
===================================================================
--- wp-includes/class-IXR.php	(wersja 21273)
+++ wp-includes/class-IXR.php	(kopia robocza)
@@ -369,7 +369,7 @@
     {
         if (!$data) {
             if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
-            	header('Content-Type: text/plain'); // merged from WP #9093
+            	wp_header( 'Content-Type: text/plain' ); // merged from WP #9093
                 die('XML-RPC server accepts POST requests only.');
             }
 
@@ -468,10 +468,10 @@
     {
         $xml = '<?xml version="1.0"?>'."\n".$xml;
         $length = strlen($xml);
-        header('Connection: close');
-        header('Content-Length: '.$length);
-        header('Content-Type: text/xml');
-        header('Date: '.date('r'));
+        wp_header( 'Connection: close' );
+        wp_header( 'Content-Length: '.$length );
+        wp_header( 'Content-Type: text/xml' );
+        wp_header( 'Date: '.date( 'r' ) );
         echo $xml;
         exit;
     }
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(wersja 21273)
+++ wp-includes/functions.php	(kopia robocza)
@@ -866,7 +866,6 @@
  *		parameters.
  *
  * @param int $header HTTP status code
- * @return unknown
  */
 function status_header( $header ) {
 	$text = get_status_header_desc( $header );
@@ -881,7 +880,7 @@
 	if ( function_exists( 'apply_filters' ) )
 		$status_header = apply_filters( 'status_header', $status_header, $header, $text, $protocol );
 
-	return @header( $status_header, true, $header );
+	wp_header( $status_header, true, $header );
 }
 
 /**
@@ -921,7 +920,7 @@
 function nocache_headers() {
 	$headers = wp_get_nocache_headers();
 	foreach( $headers as $name => $field_value )
-		@header("{$name}: {$field_value}");
+		wp_header( "{$name}: {$field_value}" );
 }
 
 /**
@@ -931,9 +930,9 @@
  */
 function cache_javascript_headers() {
 	$expiresOffset = 864000; // 10 days
-	header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) );
-	header( "Vary: Accept-Encoding" ); // Handle proxies
-	header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" );
+	wp_header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) );
+	wp_header( "Vary: Accept-Encoding" ); // Handle proxies
+	wp_header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" );
 }
 
 /**
@@ -1048,7 +1047,7 @@
  * @uses do_action() Calls 'do_robotstxt' hook for displaying robots.txt rules.
  */
 function do_robots() {
-	header( 'Content-Type: text/plain; charset=utf-8' );
+	wp_header( 'Content-Type: text/plain; charset=utf-8' );
 
 	do_action( 'do_robotstxt' );
 
@@ -1937,7 +1936,7 @@
 		if ( !headers_sent() ) {
 			status_header( $r['response'] );
 			nocache_headers();
-			header( 'Content-Type: text/html; charset=utf-8' );
+			wp_header( 'Content-Type: text/html; charset=utf-8' );
 		}
 
 		if ( empty($title) )
@@ -2510,7 +2509,7 @@
 	// Otherwise, be terse.
 	status_header( 500 );
 	nocache_headers();
-	header( 'Content-Type: text/html; charset=utf-8' );
+	wp_header( 'Content-Type: text/html; charset=utf-8' );
 
 	wp_load_translations_early();
 ?>
@@ -3391,7 +3390,7 @@
  * @return none
  */
 function send_nosniff_header() {
-	@header( 'X-Content-Type-Options: nosniff' );
+	wp_header( 'X-Content-Type-Options: nosniff' );
 }
 
 /**
@@ -3493,7 +3492,7 @@
  * @return none
  */
 function send_frame_options_header() {
-	@header( 'X-Frame-Options: SAMEORIGIN' );
+	wp_header( 'X-Frame-Options: SAMEORIGIN' );
 }
 
 /**
Index: wp-includes/class-json.php
===================================================================
--- wp-includes/class-json.php	(wersja 21273)
+++ wp-includes/class-json.php	(kopia robocza)
@@ -236,7 +236,7 @@
 	*/
 	function encode($var)
 	{
-		header('Content-type: application/json');
+		wp_header( 'Content-type: application/json' );
 		return $this->_encode($var);
 	}
 	/**
Index: wp-includes/http.php
===================================================================
--- wp-includes/http.php	(wersja 21273)
+++ wp-includes/http.php	(kopia robocza)
@@ -294,8 +294,8 @@
 	if ( ! is_allowed_http_origin( $origin ) )
 		return false;
 
-	@header( 'Access-Control-Allow-Origin: ' .  $origin );
-	@header( 'Access-Control-Allow-Credentials: true' );
+	wp_header( 'Access-Control-Allow-Origin: ' .  $origin );
+	wp_header( 'Access-Control-Allow-Credentials: true' );
 
 	return $origin;
 }
\ Brak znaku nowej linii na końcu pliku
Index: wp-includes/feed-rss.php
===================================================================
--- wp-includes/feed-rss.php	(wersja 21273)
+++ wp-includes/feed-rss.php	(kopia robocza)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
 $more = 1;
 
 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
Index: wp-includes/vars.php
===================================================================
--- wp-includes/vars.php	(wersja 21273)
+++ wp-includes/vars.php	(kopia robocza)
@@ -53,7 +53,7 @@
 	} elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) {
 		if ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) !== false ) {
 			if ( $is_chrome = apply_filters( 'use_google_chrome_frame', is_admin() ) )
-				header( 'X-UA-Compatible: chrome=1' );
+				wp_header( 'X-UA-Compatible: chrome=1' );
 			$is_winIE = ! $is_chrome;
 		} else {
 			$is_chrome = true;
Index: wp-includes/feed-rdf.php
===================================================================
--- wp-includes/feed-rdf.php	(wersja 21273)
+++ wp-includes/feed-rdf.php	(kopia robocza)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: ' . feed_content_type( 'rdf' ) . '; charset=' . get_option( 'blog_charset' ), true );
 $more = 1;
 
 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
Index: wp-includes/ms-settings.php
===================================================================
--- wp-includes/ms-settings.php	(wersja 21273)
+++ wp-includes/ms-settings.php	(kopia robocza)
@@ -88,14 +88,14 @@
 		} else {
 			$destination = 'http://' . $current_site->domain . $current_site->path . 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
 		}
-		header( 'Location: ' . $destination );
+		wp_header( 'Location: ' . $destination );
 		die();
 	}
 
 	if ( ! defined( 'WP_INSTALLING' ) ) {
 		if ( $current_site && ! $current_blog ) {
 			if ( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) {
-				header( 'Location: http://' . $current_site->domain . $current_site->path );
+				wp_header( 'Location: http://' . $current_site->domain . $current_site->path );
 				exit;
 			}
 			$current_blog = get_blog_details( array( 'domain' => $current_site->domain, 'path' => $current_site->path ), false );
Index: wp-includes/class-wp-ajax-response.php
===================================================================
--- wp-includes/class-wp-ajax-response.php	(wersja 21273)
+++ wp-includes/class-wp-ajax-response.php	(kopia robocza)
@@ -126,7 +126,7 @@
 	 * @since 2.1.0
 	 */
 	function send() {
-		header('Content-Type: text/xml');
+		wp_header( 'Content-Type: text/xml' );
 		echo "<?xml version='1.0' standalone='yes'?><wp_ajax>";
 		foreach ( (array) $this->responses as $response )
 			echo $response;
Index: wp-includes/class-simplepie.php
===================================================================
--- wp-includes/class-simplepie.php	(wersja 21273)
+++ wp-includes/class-simplepie.php	(kopia robocza)
@@ -1749,7 +1749,7 @@
 			// If we want the XML, just output that with the most likely encoding and quit
 			if ($this->xml_dump)
 			{
-				header('Content-type: text/xml; charset=' . $encodings[0]);
+				wp_header( 'Content-type: text/xml; charset=' . $encodings[0] );
 				echo $data;
 				exit;
 			}
@@ -1860,7 +1860,7 @@
 			{
 				$header .= ' charset=UTF-8';
 			}
-			header($header);
+			wp_header( $header );
 		}
 	}
 
@@ -9299,13 +9299,13 @@
 		{
 			if (isset($file['headers']['content-type']))
 			{
-				header('Content-type:' . $file['headers']['content-type']);
+				wp_header( 'Content-type:' . $file['headers']['content-type'] );
 			}
 			else
 			{
-				header('Content-type: application/octet-stream');
+				wp_header( 'Content-type: application/octet-stream' );
 			}
-			header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days
+			wp_header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 604800 ) . ' GMT' ); // 7 days
 			echo $file['body'];
 			exit;
 		}
@@ -11368,9 +11368,9 @@
 		{
 			ob_start('ob_gzhandler');
 		}
-		header('Content-type: text/javascript; charset: UTF-8');
-		header('Cache-Control: must-revalidate');
-		header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days
+		wp_header( 'Content-type: text/javascript; charset: UTF-8' );
+		wp_header( 'Cache-Control: must-revalidate' );
+		wp_header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 604800 ) . ' GMT' ); // 7 days
 		?>
 function embed_odeo(link) {
 	document.writeln('<embed src="http://odeo.com/flash/audio_player_fullsize.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" width="440" height="80" wmode="transparent" allowScriptAccess="any" flashvars="valid_sample_rate=true&external_url='+link+'"></embed>');
Index: wp-includes/class-wp-atom-server.php
===================================================================
--- wp-includes/class-wp-atom-server.php	(wersja 21273)
+++ wp-includes/class-wp-atom-server.php	(kopia robocza)
@@ -670,13 +670,13 @@
 			$this->internal_error(__('Error occurred while accessing post metadata for file location.'));
 
 		status_header('200');
-		header('Content-Type: ' . $entry['post_mime_type']);
-		header('Connection: close');
+		wp_header( 'Content-Type: ' . $entry['post_mime_type'] );
+		wp_header( 'Connection: close' );
 
 		if ( $fp = fopen($location, "rb") ) {
 			status_header('200');
-			header('Content-Type: ' . $entry['post_mime_type']);
-			header('Connection: close');
+			wp_header( 'Content-Type: ' . $entry['post_mime_type'] );
+			wp_header( 'Connection: close' );
 
 			while ( !feof($fp) ) {
 				echo fread($fp, 4096);
@@ -1094,7 +1094,7 @@
 	 * @since 2.2.0
 	 */
 	function ok() {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('200');
 		wp_die();
 	}
@@ -1105,7 +1105,7 @@
 	 * @since 2.2.0
 	 */
 	function no_content() {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('204');
 		echo "Moved to Trash.";
 		wp_die();
@@ -1119,7 +1119,7 @@
 	 * @param string $msg Optional. Status string.
 	 */
 	function internal_error($msg = 'Internal Server Error') {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('500');
 		echo $msg;
 		wp_die();
@@ -1131,7 +1131,7 @@
 	 * @since 2.2.0
 	 */
 	function bad_request() {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('400');
 		wp_die();
 	}
@@ -1142,8 +1142,8 @@
 	 * @since 2.2.0
 	 */
 	function length_required() {
-		header("HTTP/1.1 411 Length Required");
-		header('Content-Type: text/plain');
+		wp_header( "HTTP/1.1 411 Length Required" );
+		wp_header( 'Content-Type: text/plain' );
 		status_header('411');
 		wp_die();
 	}
@@ -1154,8 +1154,8 @@
 	 * @since 2.2.0
 	 */
 	function invalid_media() {
-		header("HTTP/1.1 415 Unsupported Media Type");
-		header('Content-Type: text/plain');
+		wp_header( "HTTP/1.1 415 Unsupported Media Type" );
+		wp_header( 'Content-Type: text/plain' );
 		wp_die();
 	}
 
@@ -1165,7 +1165,7 @@
 	 * @since 2.6.0
 	 */
 	function forbidden($reason='') {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('403');
 		echo $reason;
 		wp_die();
@@ -1177,7 +1177,7 @@
 	 * @since 2.2.0
 	 */
 	function not_found() {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('404');
 		wp_die();
 	}
@@ -1188,7 +1188,7 @@
 	 * @since 2.2.0
 	 */
 	function not_allowed($allow) {
-		header('Allow: ' . join(',', $allow));
+		wp_header( 'Allow: ' . join( ',', $allow ) );
 		status_header('405');
 		wp_die();
 	}
@@ -1213,9 +1213,9 @@
 </html>
 
 EOD;
-		header('HTTP/1.1 302 Moved');
-		header('Content-Type: text/html');
-		header('Location: ' . $url);
+		wp_header( 'HTTP/1.1 302 Moved' );
+		wp_header( 'Content-Type: text/html' );
+		wp_header( 'Location: ' . $url );
 		echo $content;
 		wp_die();
 
@@ -1227,7 +1227,7 @@
 	 * @since 2.2.0
 	 */
 	function client_error($msg = 'Client Error') {
-		header('Content-Type: text/plain');
+		wp_header( 'Content-Type: text/plain' );
 		status_header('400');
 		wp_die();
 	}
@@ -1249,10 +1249,10 @@
 				$edit = $this->app_base . "attachments/$post_ID";
 				break;
 		}
-		header("Content-Type: $this->ATOM_CONTENT_TYPE");
+		wp_header( "Content-Type: $this->ATOM_CONTENT_TYPE" );
 		if (isset($ctloc))
-			header('Content-Location: ' . $ctloc);
-		header('Location: ' . $edit);
+			wp_header( 'Content-Location: ' . $ctloc );
+		wp_header( 'Location: ' . $edit );
 		status_header('201');
 		echo $content;
 		wp_die();
@@ -1267,10 +1267,10 @@
 	 */
 	function auth_required($msg) {
 		nocache_headers();
-		header('WWW-Authenticate: Basic realm="WordPress Atom Protocol"');
-		header("HTTP/1.1 401 $msg");
-		header('Status: 401 ' . $msg);
-		header('Content-Type: text/html');
+		wp_header( 'WWW-Authenticate: Basic realm="WordPress Atom Protocol"' );
+		wp_header( "HTTP/1.1 401 $msg" );
+		wp_header( 'Status: 401 ' . $msg );
+		wp_header( 'Content-Type: text/html' );
 		$content = <<<EOD
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <html>
@@ -1299,11 +1299,11 @@
 	function output($xml, $ctype = 'application/atom+xml') {
 		status_header('200');
 		$xml = '<?xml version="1.0" encoding="' . strtolower(get_option('blog_charset')) . '"?>'."\n".$xml;
-		header('Connection: close');
-		header('Content-Length: '. strlen($xml));
-		header('Content-Type: ' . $ctype);
-		header('Content-Disposition: attachment; filename=atom.xml');
-		header('Date: '. date('r'));
+		wp_header( 'Connection: close' );
+		wp_header( 'Content-Length: '. strlen( $xml ) );
+		wp_header( 'Content-Type: ' . $ctype );
+		wp_header( 'Content-Disposition: attachment; filename=atom.xml' );
+		wp_header( 'Date: '. date( 'r' ) );
 		if ($this->do_output)
 			echo $xml;
 		wp_die();
@@ -1421,8 +1421,8 @@
 				return;
 		}
 		$wp_etag = md5($wp_last_modified);
-		@header("Last-Modified: $wp_last_modified");
-		@header("ETag: $wp_etag");
+		wp_header( "Last-Modified: $wp_last_modified" );
+		wp_header( "ETag: $wp_etag" );
 
 		// Support for Conditional GET
 		if (isset($_SERVER['HTTP_IF_NONE_MATCH']))
Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(wersja 21273)
+++ wp-includes/link-template.php	(kopia robocza)
@@ -2385,7 +2385,7 @@
 	if ( empty($shortlink) )
 		return;
 
-	header('Link: <' . $shortlink . '>; rel=shortlink', false);
+	wp_header( 'Link: <' . $shortlink . '>; rel=shortlink', false );
 }
 
 /**
Index: wp-includes/ms-files.php
===================================================================
--- wp-includes/ms-files.php	(wersja 21273)
+++ wp-includes/ms-files.php	(kopia robocza)
@@ -38,24 +38,24 @@
 else
 	$mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 );
 
-header( 'Content-Type: ' . $mimetype ); // always send this
+wp_header( 'Content-Type: ' . $mimetype ); // always send this
 if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) )
-	header( 'Content-Length: ' . filesize( $file ) );
+	wp_header( 'Content-Length: ' . filesize( $file ) );
 
 // Optional support for X-Sendfile and X-Accel-Redirect
 if ( WPMU_ACCEL_REDIRECT ) {
-	header( 'X-Accel-Redirect: ' . str_replace( WP_CONTENT_DIR, '', $file ) );
+	wp_header( 'X-Accel-Redirect: ' . str_replace( WP_CONTENT_DIR, '', $file ) );
 	exit;
 } elseif ( WPMU_SENDFILE ) {
-	header( 'X-Sendfile: ' . $file );
+	wp_header( 'X-Sendfile: ' . $file );
 	exit;
 }
 
 $last_modified = gmdate( 'D, d M Y H:i:s', filemtime( $file ) );
 $etag = '"' . md5( $last_modified ) . '"';
-header( "Last-Modified: $last_modified GMT" );
-header( 'ETag: ' . $etag );
-header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 100000000 ) . ' GMT' );
+wp_header( "Last-Modified: $last_modified GMT" );
+wp_header( 'ETag: ' . $etag );
+wp_header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 100000000 ) . ' GMT' );
 
 // Support for Conditional GET
 $client_etag = isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ? stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) : false;
Index: wp-includes/js/tinymce/wp-mce-help.php
===================================================================
--- wp-includes/js/tinymce/wp-mce-help.php	(wersja 21273)
+++ wp-includes/js/tinymce/wp-mce-help.php	(kopia robocza)
@@ -7,7 +7,7 @@
 
 /** @ignore */
 require_once('../../../wp-load.php');
-header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
+wp_header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) );
 ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
Index: wp-includes/js/tinymce/plugins/spellchecker/rpc.php
===================================================================
--- wp-includes/js/tinymce/plugins/spellchecker/rpc.php	(wersja 21273)
+++ wp-includes/js/tinymce/plugins/spellchecker/rpc.php	(kopia robocza)
@@ -10,13 +10,13 @@
 require_once("./includes/general.php");
 
 // Set RPC response headers
-header('Content-Type: text/plain');
-header('Content-Encoding: UTF-8');
-header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-header("Cache-Control: no-store, no-cache, must-revalidate");
-header("Cache-Control: post-check=0, pre-check=0", false);
-header("Pragma: no-cache");
+wp_header( 'Content-Type: text/plain' );
+wp_header( 'Content-Encoding: UTF-8' );
+wp_header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
+wp_header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" );
+wp_header( "Cache-Control: no-store, no-cache, must-revalidate" );
+wp_header( "Cache-Control: post-check=0, pre-check=0", false );
+wp_header( "Pragma: no-cache" );
 
 $raw = "";
 
Index: wp-includes/js/tinymce/wp-tinymce.php
===================================================================
--- wp-includes/js/tinymce/wp-tinymce.php	(wersja 21273)
+++ wp-includes/js/tinymce/wp-tinymce.php	(kopia robocza)
@@ -21,15 +21,15 @@
 
 $expires_offset = 31536000;
 
-header('Content-Type: application/x-javascript; charset=UTF-8');
-header('Vary: Accept-Encoding'); // Handle proxies
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
+wp_header( 'Content-Type: application/x-javascript; charset=UTF-8' );
+wp_header( 'Vary: Accept-Encoding' ); // Handle proxies
+wp_header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT' );
+wp_header( "Cache-Control: public, max-age=$expires_offset" );
 
 if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
 	&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
 
-	header('Content-Encoding: gzip');
+	wp_header( 'Content-Encoding: gzip' );
 	echo $file;
 } else {
 	echo get_file($basepath . '/tiny_mce.js');
Index: wp-includes/load.php
===================================================================
--- wp-includes/load.php	(wersja 21273)
+++ wp-includes/load.php	(kopia robocza)
@@ -122,8 +122,8 @@
  */
 function wp_favicon_request() {
 	if ( '/favicon.ico' == $_SERVER['REQUEST_URI'] ) {
-		header('Content-Type: image/vnd.microsoft.icon');
-		header('Content-Length: 0');
+		wp_header( 'Content-Type: image/vnd.microsoft.icon' );
+		wp_header( 'Content-Length: 0' );
 		exit;
 	}
 }
@@ -163,9 +163,9 @@
 	$protocol = $_SERVER["SERVER_PROTOCOL"];
 	if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
 		$protocol = 'HTTP/1.0';
-	header( "$protocol 503 Service Unavailable", true, 503 );
-	header( 'Content-Type: text/html; charset=utf-8' );
-	header( 'Retry-After: 600' );
+	wp_header( "$protocol 503 Service Unavailable", true, 503 );
+	wp_header( 'Content-Type: text/html; charset=utf-8' );
+	wp_header( 'Retry-After: 600' );
 ?>
 	<!DOCTYPE html>
 	<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
Index: wp-includes/feed-atom-comments.php
===================================================================
--- wp-includes/feed-atom-comments.php	(wersja 21273)
+++ wp-includes/feed-atom-comments.php	(kopia robocza)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true );
 echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
 ?>
 <feed
Index: wp-includes/feed-rss2.php
===================================================================
--- wp-includes/feed-rss2.php	(wersja 21273)
+++ wp-includes/feed-rss2.php	(kopia robocza)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
 $more = 1;
 
 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
Index: wp-includes/feed-atom.php
===================================================================
--- wp-includes/feed-atom.php	(wersja 21273)
+++ wp-includes/feed-atom.php	(kopia robocza)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true );
 $more = 1;
 
 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
Index: wp-includes/feed-rss2-comments.php
===================================================================
--- wp-includes/feed-rss2-comments.php	(wersja 21273)
+++ wp-includes/feed-rss2-comments.php	(kopia robocza)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
 
 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
 ?>
Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(wersja 21273)
+++ xmlrpc.php	(kopia robocza)
@@ -29,7 +29,7 @@
 include('./wp-load.php');
 
 if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
-header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
 ?>
 <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
 <rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
Index: wp-links-opml.php
===================================================================
--- wp-links-opml.php	(wersja 21273)
+++ wp-links-opml.php	(kopia robocza)
@@ -14,7 +14,7 @@
 
 require_once('./wp-load.php');
 
-header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
+wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
 $link_cat = '';
 if ( !empty($_GET['link_cat']) ) {
 	$link_cat = $_GET['link_cat'];
Index: wp-login.php
===================================================================
--- wp-login.php	(wersja 21273)
+++ wp-login.php	(kopia robocza)
@@ -359,7 +359,7 @@
 
 nocache_headers();
 
-header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));
+wp_header( 'Content-Type: '.get_bloginfo( 'html_type' ).'; charset='.get_bloginfo( 'charset' ) );
 
 if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set
 	if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
Index: wp-comments-post.php
===================================================================
--- wp-comments-post.php	(wersja 21273)
+++ wp-comments-post.php	(kopia robocza)
@@ -6,9 +6,9 @@
  */
 
 if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
-	header('Allow: POST');
-	header('HTTP/1.1 405 Method Not Allowed');
-	header('Content-Type: text/plain');
+	wp_header( 'Allow: POST' );
+	wp_header( 'HTTP/1.1 405 Method Not Allowed' );
+	wp_header( 'Content-Type: text/plain' );
 	exit;
 }
 
