| 1 | Index: wp-includes/pluggable.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/pluggable.php (wersja 21273) |
|---|
| 4 | +++ wp-includes/pluggable.php (kopia robocza) |
|---|
| 5 | @@ -878,7 +878,7 @@ |
|---|
| 6 | if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' ) |
|---|
| 7 | status_header($status); // This causes problems on IIS and some FastCGI setups |
|---|
| 8 | |
|---|
| 9 | - header("Location: $location", true, $status); |
|---|
| 10 | + wp_header( "Location: $location", true, $status ); |
|---|
| 11 | } |
|---|
| 12 | endif; |
|---|
| 13 | |
|---|
| 14 | @@ -1737,3 +1737,21 @@ |
|---|
| 15 | return $r; |
|---|
| 16 | } |
|---|
| 17 | endif; |
|---|
| 18 | + |
|---|
| 19 | +if ( !function_exists( 'wp_header' ) ) : |
|---|
| 20 | + /** |
|---|
| 21 | + * Sends HTTP Header to the client |
|---|
| 22 | + * |
|---|
| 23 | + * @since 3.5 |
|---|
| 24 | + * |
|---|
| 25 | + * @param string $header The header string. |
|---|
| 26 | + * @param boolean $replace True if header should replace previous header, false if not. Default is true. |
|---|
| 27 | + * @param int $http_response_code Force the HTTP response code to given value if provided. Default is null. |
|---|
| 28 | + */ |
|---|
| 29 | +function wp_header( $header, $replace = true, $http_response_code = null ) { |
|---|
| 30 | + if ( !empty( $http_response_code ) ) |
|---|
| 31 | + @header( $header, $replace, (int) $http_response_code ); |
|---|
| 32 | + else |
|---|
| 33 | + @header( $header, $replace ); |
|---|
| 34 | +} |
|---|
| 35 | +endif; |
|---|
| 36 | Index: wp-trackback.php |
|---|
| 37 | =================================================================== |
|---|
| 38 | --- wp-trackback.php (wersja 21273) |
|---|
| 39 | +++ wp-trackback.php (kopia robocza) |
|---|
| 40 | @@ -17,7 +17,7 @@ |
|---|
| 41 | * @param string $error_message Error message if an error occurred |
|---|
| 42 | */ |
|---|
| 43 | function trackback_response($error = 0, $error_message = '') { |
|---|
| 44 | - header('Content-Type: text/xml; charset=' . get_option('blog_charset') ); |
|---|
| 45 | + wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 46 | if ($error) { |
|---|
| 47 | echo '<?xml version="1.0" encoding="utf-8"?'.">\n"; |
|---|
| 48 | echo "<response>\n"; |
|---|
| 49 | @@ -82,7 +82,7 @@ |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | if ( !empty($tb_url) && !empty($title) ) { |
|---|
| 53 | - header('Content-Type: text/xml; charset=' . get_option('blog_charset') ); |
|---|
| 54 | + wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 55 | |
|---|
| 56 | if ( !pings_open($tb_id) ) |
|---|
| 57 | trackback_response(1, 'Sorry, trackbacks are closed for this item.'); |
|---|
| 58 | Index: wp-admin/network/sites.php |
|---|
| 59 | =================================================================== |
|---|
| 60 | --- wp-admin/network/sites.php (wersja 21273) |
|---|
| 61 | +++ wp-admin/network/sites.php (kopia robocza) |
|---|
| 62 | @@ -202,7 +202,7 @@ |
|---|
| 63 | check_admin_referer( 'confirm' ); |
|---|
| 64 | if ( !headers_sent() ) { |
|---|
| 65 | nocache_headers(); |
|---|
| 66 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 67 | + wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 68 | } |
|---|
| 69 | if ( $current_site->blog_id == $id ) |
|---|
| 70 | wp_die( __( 'You are not allowed to change the current site.' ) ); |
|---|
| 71 | Index: wp-admin/admin-header.php |
|---|
| 72 | =================================================================== |
|---|
| 73 | --- wp-admin/admin-header.php (wersja 21273) |
|---|
| 74 | +++ wp-admin/admin-header.php (kopia robocza) |
|---|
| 75 | @@ -6,7 +6,7 @@ |
|---|
| 76 | * @subpackage Administration |
|---|
| 77 | */ |
|---|
| 78 | |
|---|
| 79 | -@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); |
|---|
| 80 | +wp_header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); |
|---|
| 81 | if ( ! defined( 'WP_ADMIN' ) ) |
|---|
| 82 | require_once( './admin.php' ); |
|---|
| 83 | |
|---|
| 84 | Index: wp-admin/upgrade.php |
|---|
| 85 | =================================================================== |
|---|
| 86 | --- wp-admin/upgrade.php (wersja 21273) |
|---|
| 87 | +++ wp-admin/upgrade.php (kopia robocza) |
|---|
| 88 | @@ -43,7 +43,7 @@ |
|---|
| 89 | else |
|---|
| 90 | $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); |
|---|
| 91 | |
|---|
| 92 | -@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 93 | +wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 94 | ?> |
|---|
| 95 | <!DOCTYPE html> |
|---|
| 96 | <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
|---|
| 97 | Index: wp-admin/press-this.php |
|---|
| 98 | =================================================================== |
|---|
| 99 | --- wp-admin/press-this.php (wersja 21273) |
|---|
| 100 | +++ wp-admin/press-this.php (kopia robocza) |
|---|
| 101 | @@ -11,7 +11,7 @@ |
|---|
| 102 | /** WordPress Administration Bootstrap */ |
|---|
| 103 | require_once('./admin.php'); |
|---|
| 104 | |
|---|
| 105 | -header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); |
|---|
| 106 | +wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 107 | |
|---|
| 108 | if ( ! current_user_can('edit_posts') ) |
|---|
| 109 | wp_die( __( 'Cheatin’ uh?' ) ); |
|---|
| 110 | Index: wp-admin/setup-config.php |
|---|
| 111 | =================================================================== |
|---|
| 112 | --- wp-admin/setup-config.php (wersja 21273) |
|---|
| 113 | +++ wp-admin/setup-config.php (kopia robocza) |
|---|
| 114 | @@ -86,7 +86,7 @@ |
|---|
| 115 | function display_header() { |
|---|
| 116 | global $wp_version; |
|---|
| 117 | |
|---|
| 118 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 119 | + wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 120 | ?> |
|---|
| 121 | <!DOCTYPE html> |
|---|
| 122 | <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>> |
|---|
| 123 | Index: wp-admin/install.php |
|---|
| 124 | =================================================================== |
|---|
| 125 | --- wp-admin/install.php (wersja 21273) |
|---|
| 126 | +++ wp-admin/install.php (kopia robocza) |
|---|
| 127 | @@ -51,7 +51,7 @@ |
|---|
| 128 | * @subpackage Installer |
|---|
| 129 | */ |
|---|
| 130 | function display_header() { |
|---|
| 131 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 132 | + wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 133 | ?> |
|---|
| 134 | <!DOCTYPE html> |
|---|
| 135 | <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
|---|
| 136 | Index: wp-admin/async-upload.php |
|---|
| 137 | =================================================================== |
|---|
| 138 | --- wp-admin/async-upload.php (wersja 21273) |
|---|
| 139 | +++ wp-admin/async-upload.php (kopia robocza) |
|---|
| 140 | @@ -23,7 +23,7 @@ |
|---|
| 141 | unset($current_user); |
|---|
| 142 | require_once('./admin.php'); |
|---|
| 143 | |
|---|
| 144 | -header('Content-Type: text/html; charset=' . get_option('blog_charset')); |
|---|
| 145 | +wp_header('Content-Type: text/html; charset=' . get_option('blog_charset')); |
|---|
| 146 | |
|---|
| 147 | if ( !current_user_can('upload_files') ) |
|---|
| 148 | wp_die(__('You do not have permission to upload files.')); |
|---|
| 149 | Index: wp-admin/load-styles.php |
|---|
| 150 | =================================================================== |
|---|
| 151 | --- wp-admin/load-styles.php (wersja 21273) |
|---|
| 152 | +++ wp-admin/load-styles.php (kopia robocza) |
|---|
| 153 | @@ -132,17 +132,17 @@ |
|---|
| 154 | } |
|---|
| 155 | } |
|---|
| 156 | |
|---|
| 157 | -header('Content-Type: text/css'); |
|---|
| 158 | -header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
|---|
| 159 | -header("Cache-Control: public, max-age=$expires_offset"); |
|---|
| 160 | +wp_header( 'Content-Type: text/css' ); |
|---|
| 161 | +wp_header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT' ); |
|---|
| 162 | +wp_header( "Cache-Control: public, max-age=$expires_offset" ); |
|---|
| 163 | |
|---|
| 164 | if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { |
|---|
| 165 | - header('Vary: Accept-Encoding'); // Handle proxies |
|---|
| 166 | + wp_header( 'Vary: Accept-Encoding' ); // Handle proxies |
|---|
| 167 | if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
|---|
| 168 | - header('Content-Encoding: deflate'); |
|---|
| 169 | + wp_header( 'Content-Encoding: deflate' ); |
|---|
| 170 | $out = gzdeflate( $out, 3 ); |
|---|
| 171 | } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) { |
|---|
| 172 | - header('Content-Encoding: gzip'); |
|---|
| 173 | + wp_header( 'Content-Encoding: gzip' ); |
|---|
| 174 | $out = gzencode( $out, 3 ); |
|---|
| 175 | } |
|---|
| 176 | } |
|---|
| 177 | Index: wp-admin/load-scripts.php |
|---|
| 178 | =================================================================== |
|---|
| 179 | --- wp-admin/load-scripts.php (wersja 21273) |
|---|
| 180 | +++ wp-admin/load-scripts.php (kopia robocza) |
|---|
| 181 | @@ -139,17 +139,17 @@ |
|---|
| 182 | $out .= get_file($path) . "\n"; |
|---|
| 183 | } |
|---|
| 184 | |
|---|
| 185 | -header('Content-Type: application/x-javascript; charset=UTF-8'); |
|---|
| 186 | -header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
|---|
| 187 | -header("Cache-Control: public, max-age=$expires_offset"); |
|---|
| 188 | +wp_header( 'Content-Type: application/x-javascript; charset=UTF-8' ); |
|---|
| 189 | +wp_header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT' ); |
|---|
| 190 | +wp_header( "Cache-Control: public, max-age=$expires_offset" ); |
|---|
| 191 | |
|---|
| 192 | if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { |
|---|
| 193 | - header('Vary: Accept-Encoding'); // Handle proxies |
|---|
| 194 | + wp_header( 'Vary: Accept-Encoding' ); // Handle proxies |
|---|
| 195 | if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
|---|
| 196 | - header('Content-Encoding: deflate'); |
|---|
| 197 | + wp_header( 'Content-Encoding: deflate' ); |
|---|
| 198 | $out = gzdeflate( $out, 3 ); |
|---|
| 199 | } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) { |
|---|
| 200 | - header('Content-Encoding: gzip'); |
|---|
| 201 | + wp_header( 'Content-Encoding: gzip' ); |
|---|
| 202 | $out = gzencode( $out, 3 ); |
|---|
| 203 | } |
|---|
| 204 | } |
|---|
| 205 | Index: wp-admin/maint/repair.php |
|---|
| 206 | =================================================================== |
|---|
| 207 | --- wp-admin/maint/repair.php (wersja 21273) |
|---|
| 208 | +++ wp-admin/maint/repair.php (kopia robocza) |
|---|
| 209 | @@ -9,7 +9,7 @@ |
|---|
| 210 | |
|---|
| 211 | require_once('../../wp-load.php'); |
|---|
| 212 | |
|---|
| 213 | -header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 214 | +wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 215 | ?> |
|---|
| 216 | <!DOCTYPE html> |
|---|
| 217 | <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
|---|
| 218 | Index: wp-admin/admin-ajax.php |
|---|
| 219 | =================================================================== |
|---|
| 220 | --- wp-admin/admin-ajax.php (wersja 21273) |
|---|
| 221 | +++ wp-admin/admin-ajax.php (kopia robocza) |
|---|
| 222 | @@ -29,8 +29,8 @@ |
|---|
| 223 | /** Load Ajax Handlers for WordPress Core */ |
|---|
| 224 | require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); |
|---|
| 225 | |
|---|
| 226 | -@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 227 | -@header( 'X-Robots-Tag: noindex' ); |
|---|
| 228 | +wp_header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 229 | +wp_header( 'X-Robots-Tag: noindex' ); |
|---|
| 230 | |
|---|
| 231 | send_nosniff_header(); |
|---|
| 232 | |
|---|
| 233 | Index: wp-admin/includes/image-edit.php |
|---|
| 234 | =================================================================== |
|---|
| 235 | --- wp-admin/includes/image-edit.php (wersja 21273) |
|---|
| 236 | +++ wp-admin/includes/image-edit.php (kopia robocza) |
|---|
| 237 | @@ -202,13 +202,13 @@ |
|---|
| 238 | |
|---|
| 239 | switch ( $mime_type ) { |
|---|
| 240 | case 'image/jpeg': |
|---|
| 241 | - header('Content-Type: image/jpeg'); |
|---|
| 242 | + wp_header( 'Content-Type: image/jpeg' ); |
|---|
| 243 | return imagejpeg($image, null, 90); |
|---|
| 244 | case 'image/png': |
|---|
| 245 | - header('Content-Type: image/png'); |
|---|
| 246 | + wp_header( 'Content-Type: image/png' ); |
|---|
| 247 | return imagepng($image); |
|---|
| 248 | case 'image/gif': |
|---|
| 249 | - header('Content-Type: image/gif'); |
|---|
| 250 | + wp_header( 'Content-Type: image/gif' ); |
|---|
| 251 | return imagegif($image); |
|---|
| 252 | default: |
|---|
| 253 | return false; |
|---|
| 254 | Index: wp-admin/includes/export.php |
|---|
| 255 | =================================================================== |
|---|
| 256 | --- wp-admin/includes/export.php (wersja 21273) |
|---|
| 257 | +++ wp-admin/includes/export.php (kopia robocza) |
|---|
| 258 | @@ -36,9 +36,9 @@ |
|---|
| 259 | if ( ! empty($sitename) ) $sitename .= '.'; |
|---|
| 260 | $filename = $sitename . 'wordpress.' . date( 'Y-m-d' ) . '.xml'; |
|---|
| 261 | |
|---|
| 262 | - header( 'Content-Description: File Transfer' ); |
|---|
| 263 | - header( 'Content-Disposition: attachment; filename=' . $filename ); |
|---|
| 264 | - header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 265 | + wp_header( 'Content-Description: File Transfer' ); |
|---|
| 266 | + wp_header( 'Content-Disposition: attachment; filename=' . $filename ); |
|---|
| 267 | + wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 268 | |
|---|
| 269 | if ( 'all' != $args['content'] && post_type_exists( $args['content'] ) ) { |
|---|
| 270 | $ptype = get_post_type_object( $args['content'] ); |
|---|
| 271 | Index: wp-admin/includes/ajax-actions.php |
|---|
| 272 | =================================================================== |
|---|
| 273 | --- wp-admin/includes/ajax-actions.php (wersja 21273) |
|---|
| 274 | +++ wp-admin/includes/ajax-actions.php (kopia robocza) |
|---|
| 275 | @@ -93,11 +93,11 @@ |
|---|
| 276 | } |
|---|
| 277 | |
|---|
| 278 | if ( isset($_GET['test']) ) { |
|---|
| 279 | - header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); |
|---|
| 280 | - header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); |
|---|
| 281 | - header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); |
|---|
| 282 | - header( 'Pragma: no-cache' ); |
|---|
| 283 | - header('Content-Type: application/x-javascript; charset=UTF-8'); |
|---|
| 284 | + wp_header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); |
|---|
| 285 | + wp_header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); |
|---|
| 286 | + wp_header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); |
|---|
| 287 | + wp_header( 'Pragma: no-cache' ); |
|---|
| 288 | + wp_header( 'Content-Type: application/x-javascript; charset=UTF-8' ); |
|---|
| 289 | $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP ); |
|---|
| 290 | $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."'; |
|---|
| 291 | |
|---|
| 292 | @@ -108,10 +108,10 @@ |
|---|
| 293 | if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) |
|---|
| 294 | wp_die( -1 ); |
|---|
| 295 | if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
|---|
| 296 | - header('Content-Encoding: deflate'); |
|---|
| 297 | + wp_header( 'Content-Encoding: deflate' ); |
|---|
| 298 | $out = gzdeflate( $test_str, 1 ); |
|---|
| 299 | } elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) { |
|---|
| 300 | - header('Content-Encoding: gzip'); |
|---|
| 301 | + wp_header( 'Content-Encoding: gzip' ); |
|---|
| 302 | $out = gzencode( $test_str, 1 ); |
|---|
| 303 | } else { |
|---|
| 304 | wp_die( -1 ); |
|---|
| 305 | Index: wp-admin/customize.php |
|---|
| 306 | =================================================================== |
|---|
| 307 | --- wp-admin/customize.php (wersja 21273) |
|---|
| 308 | +++ wp-admin/customize.php (kopia robocza) |
|---|
| 309 | @@ -39,7 +39,7 @@ |
|---|
| 310 | do_action( 'customize_controls_enqueue_scripts' ); |
|---|
| 311 | |
|---|
| 312 | // Let's roll. |
|---|
| 313 | -@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); |
|---|
| 314 | +wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 315 | |
|---|
| 316 | wp_user_settings(); |
|---|
| 317 | _wp_admin_html_begin(); |
|---|
| 318 | Index: wp-admin/media-upload.php |
|---|
| 319 | =================================================================== |
|---|
| 320 | --- wp-admin/media-upload.php (wersja 21273) |
|---|
| 321 | +++ wp-admin/media-upload.php (kopia robocza) |
|---|
| 322 | @@ -24,7 +24,7 @@ |
|---|
| 323 | wp_enqueue_style('imgareaselect'); |
|---|
| 324 | wp_enqueue_script( 'media-gallery' ); |
|---|
| 325 | |
|---|
| 326 | -@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); |
|---|
| 327 | +wp_header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); |
|---|
| 328 | |
|---|
| 329 | // IDs should be integers |
|---|
| 330 | $ID = isset($ID) ? (int) $ID : 0; |
|---|
| 331 | Index: wp-includes/class-wp.php |
|---|
| 332 | =================================================================== |
|---|
| 333 | --- wp-includes/class-wp.php (wersja 21273) |
|---|
| 334 | +++ wp-includes/class-wp.php (kopia robocza) |
|---|
| 335 | @@ -377,7 +377,7 @@ |
|---|
| 336 | if ( ! empty( $status ) ) |
|---|
| 337 | status_header( $status ); |
|---|
| 338 | foreach( (array) $headers as $name => $field_value ) |
|---|
| 339 | - @header("{$name}: {$field_value}"); |
|---|
| 340 | + wp_header( "{$name}: {$field_value}" ); |
|---|
| 341 | |
|---|
| 342 | if ( $exit_required ) |
|---|
| 343 | exit(); |
|---|
| 344 | Index: wp-includes/class-IXR.php |
|---|
| 345 | =================================================================== |
|---|
| 346 | --- wp-includes/class-IXR.php (wersja 21273) |
|---|
| 347 | +++ wp-includes/class-IXR.php (kopia robocza) |
|---|
| 348 | @@ -369,7 +369,7 @@ |
|---|
| 349 | { |
|---|
| 350 | if (!$data) { |
|---|
| 351 | if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') { |
|---|
| 352 | - header('Content-Type: text/plain'); // merged from WP #9093 |
|---|
| 353 | + wp_header( 'Content-Type: text/plain' ); // merged from WP #9093 |
|---|
| 354 | die('XML-RPC server accepts POST requests only.'); |
|---|
| 355 | } |
|---|
| 356 | |
|---|
| 357 | @@ -468,10 +468,10 @@ |
|---|
| 358 | { |
|---|
| 359 | $xml = '<?xml version="1.0"?>'."\n".$xml; |
|---|
| 360 | $length = strlen($xml); |
|---|
| 361 | - header('Connection: close'); |
|---|
| 362 | - header('Content-Length: '.$length); |
|---|
| 363 | - header('Content-Type: text/xml'); |
|---|
| 364 | - header('Date: '.date('r')); |
|---|
| 365 | + wp_header( 'Connection: close' ); |
|---|
| 366 | + wp_header( 'Content-Length: '.$length ); |
|---|
| 367 | + wp_header( 'Content-Type: text/xml' ); |
|---|
| 368 | + wp_header( 'Date: '.date( 'r' ) ); |
|---|
| 369 | echo $xml; |
|---|
| 370 | exit; |
|---|
| 371 | } |
|---|
| 372 | Index: wp-includes/functions.php |
|---|
| 373 | =================================================================== |
|---|
| 374 | --- wp-includes/functions.php (wersja 21273) |
|---|
| 375 | +++ wp-includes/functions.php (kopia robocza) |
|---|
| 376 | @@ -866,7 +866,6 @@ |
|---|
| 377 | * parameters. |
|---|
| 378 | * |
|---|
| 379 | * @param int $header HTTP status code |
|---|
| 380 | - * @return unknown |
|---|
| 381 | */ |
|---|
| 382 | function status_header( $header ) { |
|---|
| 383 | $text = get_status_header_desc( $header ); |
|---|
| 384 | @@ -881,7 +880,7 @@ |
|---|
| 385 | if ( function_exists( 'apply_filters' ) ) |
|---|
| 386 | $status_header = apply_filters( 'status_header', $status_header, $header, $text, $protocol ); |
|---|
| 387 | |
|---|
| 388 | - return @header( $status_header, true, $header ); |
|---|
| 389 | + wp_header( $status_header, true, $header ); |
|---|
| 390 | } |
|---|
| 391 | |
|---|
| 392 | /** |
|---|
| 393 | @@ -921,7 +920,7 @@ |
|---|
| 394 | function nocache_headers() { |
|---|
| 395 | $headers = wp_get_nocache_headers(); |
|---|
| 396 | foreach( $headers as $name => $field_value ) |
|---|
| 397 | - @header("{$name}: {$field_value}"); |
|---|
| 398 | + wp_header( "{$name}: {$field_value}" ); |
|---|
| 399 | } |
|---|
| 400 | |
|---|
| 401 | /** |
|---|
| 402 | @@ -931,9 +930,9 @@ |
|---|
| 403 | */ |
|---|
| 404 | function cache_javascript_headers() { |
|---|
| 405 | $expiresOffset = 864000; // 10 days |
|---|
| 406 | - header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) ); |
|---|
| 407 | - header( "Vary: Accept-Encoding" ); // Handle proxies |
|---|
| 408 | - header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" ); |
|---|
| 409 | + wp_header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) ); |
|---|
| 410 | + wp_header( "Vary: Accept-Encoding" ); // Handle proxies |
|---|
| 411 | + wp_header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" ); |
|---|
| 412 | } |
|---|
| 413 | |
|---|
| 414 | /** |
|---|
| 415 | @@ -1048,7 +1047,7 @@ |
|---|
| 416 | * @uses do_action() Calls 'do_robotstxt' hook for displaying robots.txt rules. |
|---|
| 417 | */ |
|---|
| 418 | function do_robots() { |
|---|
| 419 | - header( 'Content-Type: text/plain; charset=utf-8' ); |
|---|
| 420 | + wp_header( 'Content-Type: text/plain; charset=utf-8' ); |
|---|
| 421 | |
|---|
| 422 | do_action( 'do_robotstxt' ); |
|---|
| 423 | |
|---|
| 424 | @@ -1937,7 +1936,7 @@ |
|---|
| 425 | if ( !headers_sent() ) { |
|---|
| 426 | status_header( $r['response'] ); |
|---|
| 427 | nocache_headers(); |
|---|
| 428 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 429 | + wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 430 | } |
|---|
| 431 | |
|---|
| 432 | if ( empty($title) ) |
|---|
| 433 | @@ -2510,7 +2509,7 @@ |
|---|
| 434 | // Otherwise, be terse. |
|---|
| 435 | status_header( 500 ); |
|---|
| 436 | nocache_headers(); |
|---|
| 437 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 438 | + wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 439 | |
|---|
| 440 | wp_load_translations_early(); |
|---|
| 441 | ?> |
|---|
| 442 | @@ -3391,7 +3390,7 @@ |
|---|
| 443 | * @return none |
|---|
| 444 | */ |
|---|
| 445 | function send_nosniff_header() { |
|---|
| 446 | - @header( 'X-Content-Type-Options: nosniff' ); |
|---|
| 447 | + wp_header( 'X-Content-Type-Options: nosniff' ); |
|---|
| 448 | } |
|---|
| 449 | |
|---|
| 450 | /** |
|---|
| 451 | @@ -3493,7 +3492,7 @@ |
|---|
| 452 | * @return none |
|---|
| 453 | */ |
|---|
| 454 | function send_frame_options_header() { |
|---|
| 455 | - @header( 'X-Frame-Options: SAMEORIGIN' ); |
|---|
| 456 | + wp_header( 'X-Frame-Options: SAMEORIGIN' ); |
|---|
| 457 | } |
|---|
| 458 | |
|---|
| 459 | /** |
|---|
| 460 | Index: wp-includes/class-json.php |
|---|
| 461 | =================================================================== |
|---|
| 462 | --- wp-includes/class-json.php (wersja 21273) |
|---|
| 463 | +++ wp-includes/class-json.php (kopia robocza) |
|---|
| 464 | @@ -236,7 +236,7 @@ |
|---|
| 465 | */ |
|---|
| 466 | function encode($var) |
|---|
| 467 | { |
|---|
| 468 | - header('Content-type: application/json'); |
|---|
| 469 | + wp_header( 'Content-type: application/json' ); |
|---|
| 470 | return $this->_encode($var); |
|---|
| 471 | } |
|---|
| 472 | /** |
|---|
| 473 | Index: wp-includes/http.php |
|---|
| 474 | =================================================================== |
|---|
| 475 | --- wp-includes/http.php (wersja 21273) |
|---|
| 476 | +++ wp-includes/http.php (kopia robocza) |
|---|
| 477 | @@ -294,8 +294,8 @@ |
|---|
| 478 | if ( ! is_allowed_http_origin( $origin ) ) |
|---|
| 479 | return false; |
|---|
| 480 | |
|---|
| 481 | - @header( 'Access-Control-Allow-Origin: ' . $origin ); |
|---|
| 482 | - @header( 'Access-Control-Allow-Credentials: true' ); |
|---|
| 483 | + wp_header( 'Access-Control-Allow-Origin: ' . $origin ); |
|---|
| 484 | + wp_header( 'Access-Control-Allow-Credentials: true' ); |
|---|
| 485 | |
|---|
| 486 | return $origin; |
|---|
| 487 | } |
|---|
| 488 | \ Brak znaku nowej linii na końcu pliku |
|---|
| 489 | Index: wp-includes/feed-rss.php |
|---|
| 490 | =================================================================== |
|---|
| 491 | --- wp-includes/feed-rss.php (wersja 21273) |
|---|
| 492 | +++ wp-includes/feed-rss.php (kopia robocza) |
|---|
| 493 | @@ -5,7 +5,7 @@ |
|---|
| 494 | * @package WordPress |
|---|
| 495 | */ |
|---|
| 496 | |
|---|
| 497 | -header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); |
|---|
| 498 | +wp_header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 499 | $more = 1; |
|---|
| 500 | |
|---|
| 501 | echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> |
|---|
| 502 | Index: wp-includes/vars.php |
|---|
| 503 | =================================================================== |
|---|
| 504 | --- wp-includes/vars.php (wersja 21273) |
|---|
| 505 | +++ wp-includes/vars.php (kopia robocza) |
|---|
| 506 | @@ -53,7 +53,7 @@ |
|---|
| 507 | } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) { |
|---|
| 508 | if ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) !== false ) { |
|---|
| 509 | if ( $is_chrome = apply_filters( 'use_google_chrome_frame', is_admin() ) ) |
|---|
| 510 | - header( 'X-UA-Compatible: chrome=1' ); |
|---|
| 511 | + wp_header( 'X-UA-Compatible: chrome=1' ); |
|---|
| 512 | $is_winIE = ! $is_chrome; |
|---|
| 513 | } else { |
|---|
| 514 | $is_chrome = true; |
|---|
| 515 | Index: wp-includes/feed-rdf.php |
|---|
| 516 | =================================================================== |
|---|
| 517 | --- wp-includes/feed-rdf.php (wersja 21273) |
|---|
| 518 | +++ wp-includes/feed-rdf.php (kopia robocza) |
|---|
| 519 | @@ -5,7 +5,7 @@ |
|---|
| 520 | * @package WordPress |
|---|
| 521 | */ |
|---|
| 522 | |
|---|
| 523 | -header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true); |
|---|
| 524 | +wp_header( 'Content-Type: ' . feed_content_type( 'rdf' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 525 | $more = 1; |
|---|
| 526 | |
|---|
| 527 | echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> |
|---|
| 528 | Index: wp-includes/ms-settings.php |
|---|
| 529 | =================================================================== |
|---|
| 530 | --- wp-includes/ms-settings.php (wersja 21273) |
|---|
| 531 | +++ wp-includes/ms-settings.php (kopia robocza) |
|---|
| 532 | @@ -88,14 +88,14 @@ |
|---|
| 533 | } else { |
|---|
| 534 | $destination = 'http://' . $current_site->domain . $current_site->path . 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain ); |
|---|
| 535 | } |
|---|
| 536 | - header( 'Location: ' . $destination ); |
|---|
| 537 | + wp_header( 'Location: ' . $destination ); |
|---|
| 538 | die(); |
|---|
| 539 | } |
|---|
| 540 | |
|---|
| 541 | if ( ! defined( 'WP_INSTALLING' ) ) { |
|---|
| 542 | if ( $current_site && ! $current_blog ) { |
|---|
| 543 | if ( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) { |
|---|
| 544 | - header( 'Location: http://' . $current_site->domain . $current_site->path ); |
|---|
| 545 | + wp_header( 'Location: http://' . $current_site->domain . $current_site->path ); |
|---|
| 546 | exit; |
|---|
| 547 | } |
|---|
| 548 | $current_blog = get_blog_details( array( 'domain' => $current_site->domain, 'path' => $current_site->path ), false ); |
|---|
| 549 | Index: wp-includes/class-wp-ajax-response.php |
|---|
| 550 | =================================================================== |
|---|
| 551 | --- wp-includes/class-wp-ajax-response.php (wersja 21273) |
|---|
| 552 | +++ wp-includes/class-wp-ajax-response.php (kopia robocza) |
|---|
| 553 | @@ -126,7 +126,7 @@ |
|---|
| 554 | * @since 2.1.0 |
|---|
| 555 | */ |
|---|
| 556 | function send() { |
|---|
| 557 | - header('Content-Type: text/xml'); |
|---|
| 558 | + wp_header( 'Content-Type: text/xml' ); |
|---|
| 559 | echo "<?xml version='1.0' standalone='yes'?><wp_ajax>"; |
|---|
| 560 | foreach ( (array) $this->responses as $response ) |
|---|
| 561 | echo $response; |
|---|
| 562 | Index: wp-includes/class-simplepie.php |
|---|
| 563 | =================================================================== |
|---|
| 564 | --- wp-includes/class-simplepie.php (wersja 21273) |
|---|
| 565 | +++ wp-includes/class-simplepie.php (kopia robocza) |
|---|
| 566 | @@ -1749,7 +1749,7 @@ |
|---|
| 567 | // If we want the XML, just output that with the most likely encoding and quit |
|---|
| 568 | if ($this->xml_dump) |
|---|
| 569 | { |
|---|
| 570 | - header('Content-type: text/xml; charset=' . $encodings[0]); |
|---|
| 571 | + wp_header( 'Content-type: text/xml; charset=' . $encodings[0] ); |
|---|
| 572 | echo $data; |
|---|
| 573 | exit; |
|---|
| 574 | } |
|---|
| 575 | @@ -1860,7 +1860,7 @@ |
|---|
| 576 | { |
|---|
| 577 | $header .= ' charset=UTF-8'; |
|---|
| 578 | } |
|---|
| 579 | - header($header); |
|---|
| 580 | + wp_header( $header ); |
|---|
| 581 | } |
|---|
| 582 | } |
|---|
| 583 | |
|---|
| 584 | @@ -9299,13 +9299,13 @@ |
|---|
| 585 | { |
|---|
| 586 | if (isset($file['headers']['content-type'])) |
|---|
| 587 | { |
|---|
| 588 | - header('Content-type:' . $file['headers']['content-type']); |
|---|
| 589 | + wp_header( 'Content-type:' . $file['headers']['content-type'] ); |
|---|
| 590 | } |
|---|
| 591 | else |
|---|
| 592 | { |
|---|
| 593 | - header('Content-type: application/octet-stream'); |
|---|
| 594 | + wp_header( 'Content-type: application/octet-stream' ); |
|---|
| 595 | } |
|---|
| 596 | - header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days |
|---|
| 597 | + wp_header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 604800 ) . ' GMT' ); // 7 days |
|---|
| 598 | echo $file['body']; |
|---|
| 599 | exit; |
|---|
| 600 | } |
|---|
| 601 | @@ -11368,9 +11368,9 @@ |
|---|
| 602 | { |
|---|
| 603 | ob_start('ob_gzhandler'); |
|---|
| 604 | } |
|---|
| 605 | - header('Content-type: text/javascript; charset: UTF-8'); |
|---|
| 606 | - header('Cache-Control: must-revalidate'); |
|---|
| 607 | - header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days |
|---|
| 608 | + wp_header( 'Content-type: text/javascript; charset: UTF-8' ); |
|---|
| 609 | + wp_header( 'Cache-Control: must-revalidate' ); |
|---|
| 610 | + wp_header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 604800 ) . ' GMT' ); // 7 days |
|---|
| 611 | ?> |
|---|
| 612 | function embed_odeo(link) { |
|---|
| 613 | 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>'); |
|---|
| 614 | Index: wp-includes/class-wp-atom-server.php |
|---|
| 615 | =================================================================== |
|---|
| 616 | --- wp-includes/class-wp-atom-server.php (wersja 21273) |
|---|
| 617 | +++ wp-includes/class-wp-atom-server.php (kopia robocza) |
|---|
| 618 | @@ -670,13 +670,13 @@ |
|---|
| 619 | $this->internal_error(__('Error occurred while accessing post metadata for file location.')); |
|---|
| 620 | |
|---|
| 621 | status_header('200'); |
|---|
| 622 | - header('Content-Type: ' . $entry['post_mime_type']); |
|---|
| 623 | - header('Connection: close'); |
|---|
| 624 | + wp_header( 'Content-Type: ' . $entry['post_mime_type'] ); |
|---|
| 625 | + wp_header( 'Connection: close' ); |
|---|
| 626 | |
|---|
| 627 | if ( $fp = fopen($location, "rb") ) { |
|---|
| 628 | status_header('200'); |
|---|
| 629 | - header('Content-Type: ' . $entry['post_mime_type']); |
|---|
| 630 | - header('Connection: close'); |
|---|
| 631 | + wp_header( 'Content-Type: ' . $entry['post_mime_type'] ); |
|---|
| 632 | + wp_header( 'Connection: close' ); |
|---|
| 633 | |
|---|
| 634 | while ( !feof($fp) ) { |
|---|
| 635 | echo fread($fp, 4096); |
|---|
| 636 | @@ -1094,7 +1094,7 @@ |
|---|
| 637 | * @since 2.2.0 |
|---|
| 638 | */ |
|---|
| 639 | function ok() { |
|---|
| 640 | - header('Content-Type: text/plain'); |
|---|
| 641 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 642 | status_header('200'); |
|---|
| 643 | wp_die(); |
|---|
| 644 | } |
|---|
| 645 | @@ -1105,7 +1105,7 @@ |
|---|
| 646 | * @since 2.2.0 |
|---|
| 647 | */ |
|---|
| 648 | function no_content() { |
|---|
| 649 | - header('Content-Type: text/plain'); |
|---|
| 650 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 651 | status_header('204'); |
|---|
| 652 | echo "Moved to Trash."; |
|---|
| 653 | wp_die(); |
|---|
| 654 | @@ -1119,7 +1119,7 @@ |
|---|
| 655 | * @param string $msg Optional. Status string. |
|---|
| 656 | */ |
|---|
| 657 | function internal_error($msg = 'Internal Server Error') { |
|---|
| 658 | - header('Content-Type: text/plain'); |
|---|
| 659 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 660 | status_header('500'); |
|---|
| 661 | echo $msg; |
|---|
| 662 | wp_die(); |
|---|
| 663 | @@ -1131,7 +1131,7 @@ |
|---|
| 664 | * @since 2.2.0 |
|---|
| 665 | */ |
|---|
| 666 | function bad_request() { |
|---|
| 667 | - header('Content-Type: text/plain'); |
|---|
| 668 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 669 | status_header('400'); |
|---|
| 670 | wp_die(); |
|---|
| 671 | } |
|---|
| 672 | @@ -1142,8 +1142,8 @@ |
|---|
| 673 | * @since 2.2.0 |
|---|
| 674 | */ |
|---|
| 675 | function length_required() { |
|---|
| 676 | - header("HTTP/1.1 411 Length Required"); |
|---|
| 677 | - header('Content-Type: text/plain'); |
|---|
| 678 | + wp_header( "HTTP/1.1 411 Length Required" ); |
|---|
| 679 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 680 | status_header('411'); |
|---|
| 681 | wp_die(); |
|---|
| 682 | } |
|---|
| 683 | @@ -1154,8 +1154,8 @@ |
|---|
| 684 | * @since 2.2.0 |
|---|
| 685 | */ |
|---|
| 686 | function invalid_media() { |
|---|
| 687 | - header("HTTP/1.1 415 Unsupported Media Type"); |
|---|
| 688 | - header('Content-Type: text/plain'); |
|---|
| 689 | + wp_header( "HTTP/1.1 415 Unsupported Media Type" ); |
|---|
| 690 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 691 | wp_die(); |
|---|
| 692 | } |
|---|
| 693 | |
|---|
| 694 | @@ -1165,7 +1165,7 @@ |
|---|
| 695 | * @since 2.6.0 |
|---|
| 696 | */ |
|---|
| 697 | function forbidden($reason='') { |
|---|
| 698 | - header('Content-Type: text/plain'); |
|---|
| 699 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 700 | status_header('403'); |
|---|
| 701 | echo $reason; |
|---|
| 702 | wp_die(); |
|---|
| 703 | @@ -1177,7 +1177,7 @@ |
|---|
| 704 | * @since 2.2.0 |
|---|
| 705 | */ |
|---|
| 706 | function not_found() { |
|---|
| 707 | - header('Content-Type: text/plain'); |
|---|
| 708 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 709 | status_header('404'); |
|---|
| 710 | wp_die(); |
|---|
| 711 | } |
|---|
| 712 | @@ -1188,7 +1188,7 @@ |
|---|
| 713 | * @since 2.2.0 |
|---|
| 714 | */ |
|---|
| 715 | function not_allowed($allow) { |
|---|
| 716 | - header('Allow: ' . join(',', $allow)); |
|---|
| 717 | + wp_header( 'Allow: ' . join( ',', $allow ) ); |
|---|
| 718 | status_header('405'); |
|---|
| 719 | wp_die(); |
|---|
| 720 | } |
|---|
| 721 | @@ -1213,9 +1213,9 @@ |
|---|
| 722 | </html> |
|---|
| 723 | |
|---|
| 724 | EOD; |
|---|
| 725 | - header('HTTP/1.1 302 Moved'); |
|---|
| 726 | - header('Content-Type: text/html'); |
|---|
| 727 | - header('Location: ' . $url); |
|---|
| 728 | + wp_header( 'HTTP/1.1 302 Moved' ); |
|---|
| 729 | + wp_header( 'Content-Type: text/html' ); |
|---|
| 730 | + wp_header( 'Location: ' . $url ); |
|---|
| 731 | echo $content; |
|---|
| 732 | wp_die(); |
|---|
| 733 | |
|---|
| 734 | @@ -1227,7 +1227,7 @@ |
|---|
| 735 | * @since 2.2.0 |
|---|
| 736 | */ |
|---|
| 737 | function client_error($msg = 'Client Error') { |
|---|
| 738 | - header('Content-Type: text/plain'); |
|---|
| 739 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 740 | status_header('400'); |
|---|
| 741 | wp_die(); |
|---|
| 742 | } |
|---|
| 743 | @@ -1249,10 +1249,10 @@ |
|---|
| 744 | $edit = $this->app_base . "attachments/$post_ID"; |
|---|
| 745 | break; |
|---|
| 746 | } |
|---|
| 747 | - header("Content-Type: $this->ATOM_CONTENT_TYPE"); |
|---|
| 748 | + wp_header( "Content-Type: $this->ATOM_CONTENT_TYPE" ); |
|---|
| 749 | if (isset($ctloc)) |
|---|
| 750 | - header('Content-Location: ' . $ctloc); |
|---|
| 751 | - header('Location: ' . $edit); |
|---|
| 752 | + wp_header( 'Content-Location: ' . $ctloc ); |
|---|
| 753 | + wp_header( 'Location: ' . $edit ); |
|---|
| 754 | status_header('201'); |
|---|
| 755 | echo $content; |
|---|
| 756 | wp_die(); |
|---|
| 757 | @@ -1267,10 +1267,10 @@ |
|---|
| 758 | */ |
|---|
| 759 | function auth_required($msg) { |
|---|
| 760 | nocache_headers(); |
|---|
| 761 | - header('WWW-Authenticate: Basic realm="WordPress Atom Protocol"'); |
|---|
| 762 | - header("HTTP/1.1 401 $msg"); |
|---|
| 763 | - header('Status: 401 ' . $msg); |
|---|
| 764 | - header('Content-Type: text/html'); |
|---|
| 765 | + wp_header( 'WWW-Authenticate: Basic realm="WordPress Atom Protocol"' ); |
|---|
| 766 | + wp_header( "HTTP/1.1 401 $msg" ); |
|---|
| 767 | + wp_header( 'Status: 401 ' . $msg ); |
|---|
| 768 | + wp_header( 'Content-Type: text/html' ); |
|---|
| 769 | $content = <<<EOD |
|---|
| 770 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> |
|---|
| 771 | <html> |
|---|
| 772 | @@ -1299,11 +1299,11 @@ |
|---|
| 773 | function output($xml, $ctype = 'application/atom+xml') { |
|---|
| 774 | status_header('200'); |
|---|
| 775 | $xml = '<?xml version="1.0" encoding="' . strtolower(get_option('blog_charset')) . '"?>'."\n".$xml; |
|---|
| 776 | - header('Connection: close'); |
|---|
| 777 | - header('Content-Length: '. strlen($xml)); |
|---|
| 778 | - header('Content-Type: ' . $ctype); |
|---|
| 779 | - header('Content-Disposition: attachment; filename=atom.xml'); |
|---|
| 780 | - header('Date: '. date('r')); |
|---|
| 781 | + wp_header( 'Connection: close' ); |
|---|
| 782 | + wp_header( 'Content-Length: '. strlen( $xml ) ); |
|---|
| 783 | + wp_header( 'Content-Type: ' . $ctype ); |
|---|
| 784 | + wp_header( 'Content-Disposition: attachment; filename=atom.xml' ); |
|---|
| 785 | + wp_header( 'Date: '. date( 'r' ) ); |
|---|
| 786 | if ($this->do_output) |
|---|
| 787 | echo $xml; |
|---|
| 788 | wp_die(); |
|---|
| 789 | @@ -1421,8 +1421,8 @@ |
|---|
| 790 | return; |
|---|
| 791 | } |
|---|
| 792 | $wp_etag = md5($wp_last_modified); |
|---|
| 793 | - @header("Last-Modified: $wp_last_modified"); |
|---|
| 794 | - @header("ETag: $wp_etag"); |
|---|
| 795 | + wp_header( "Last-Modified: $wp_last_modified" ); |
|---|
| 796 | + wp_header( "ETag: $wp_etag" ); |
|---|
| 797 | |
|---|
| 798 | // Support for Conditional GET |
|---|
| 799 | if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) |
|---|
| 800 | Index: wp-includes/link-template.php |
|---|
| 801 | =================================================================== |
|---|
| 802 | --- wp-includes/link-template.php (wersja 21273) |
|---|
| 803 | +++ wp-includes/link-template.php (kopia robocza) |
|---|
| 804 | @@ -2385,7 +2385,7 @@ |
|---|
| 805 | if ( empty($shortlink) ) |
|---|
| 806 | return; |
|---|
| 807 | |
|---|
| 808 | - header('Link: <' . $shortlink . '>; rel=shortlink', false); |
|---|
| 809 | + wp_header( 'Link: <' . $shortlink . '>; rel=shortlink', false ); |
|---|
| 810 | } |
|---|
| 811 | |
|---|
| 812 | /** |
|---|
| 813 | Index: wp-includes/ms-files.php |
|---|
| 814 | =================================================================== |
|---|
| 815 | --- wp-includes/ms-files.php (wersja 21273) |
|---|
| 816 | +++ wp-includes/ms-files.php (kopia robocza) |
|---|
| 817 | @@ -38,24 +38,24 @@ |
|---|
| 818 | else |
|---|
| 819 | $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 ); |
|---|
| 820 | |
|---|
| 821 | -header( 'Content-Type: ' . $mimetype ); // always send this |
|---|
| 822 | +wp_header( 'Content-Type: ' . $mimetype ); // always send this |
|---|
| 823 | if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) ) |
|---|
| 824 | - header( 'Content-Length: ' . filesize( $file ) ); |
|---|
| 825 | + wp_header( 'Content-Length: ' . filesize( $file ) ); |
|---|
| 826 | |
|---|
| 827 | // Optional support for X-Sendfile and X-Accel-Redirect |
|---|
| 828 | if ( WPMU_ACCEL_REDIRECT ) { |
|---|
| 829 | - header( 'X-Accel-Redirect: ' . str_replace( WP_CONTENT_DIR, '', $file ) ); |
|---|
| 830 | + wp_header( 'X-Accel-Redirect: ' . str_replace( WP_CONTENT_DIR, '', $file ) ); |
|---|
| 831 | exit; |
|---|
| 832 | } elseif ( WPMU_SENDFILE ) { |
|---|
| 833 | - header( 'X-Sendfile: ' . $file ); |
|---|
| 834 | + wp_header( 'X-Sendfile: ' . $file ); |
|---|
| 835 | exit; |
|---|
| 836 | } |
|---|
| 837 | |
|---|
| 838 | $last_modified = gmdate( 'D, d M Y H:i:s', filemtime( $file ) ); |
|---|
| 839 | $etag = '"' . md5( $last_modified ) . '"'; |
|---|
| 840 | -header( "Last-Modified: $last_modified GMT" ); |
|---|
| 841 | -header( 'ETag: ' . $etag ); |
|---|
| 842 | -header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 100000000 ) . ' GMT' ); |
|---|
| 843 | +wp_header( "Last-Modified: $last_modified GMT" ); |
|---|
| 844 | +wp_header( 'ETag: ' . $etag ); |
|---|
| 845 | +wp_header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 100000000 ) . ' GMT' ); |
|---|
| 846 | |
|---|
| 847 | // Support for Conditional GET |
|---|
| 848 | $client_etag = isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ? stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) : false; |
|---|
| 849 | Index: wp-includes/js/tinymce/wp-mce-help.php |
|---|
| 850 | =================================================================== |
|---|
| 851 | --- wp-includes/js/tinymce/wp-mce-help.php (wersja 21273) |
|---|
| 852 | +++ wp-includes/js/tinymce/wp-mce-help.php (kopia robocza) |
|---|
| 853 | @@ -7,7 +7,7 @@ |
|---|
| 854 | |
|---|
| 855 | /** @ignore */ |
|---|
| 856 | require_once('../../../wp-load.php'); |
|---|
| 857 | -header('Content-Type: text/html; charset=' . get_bloginfo('charset')); |
|---|
| 858 | +wp_header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) ); |
|---|
| 859 | ?> |
|---|
| 860 | <!DOCTYPE html> |
|---|
| 861 | <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> |
|---|
| 862 | Index: wp-includes/js/tinymce/plugins/spellchecker/rpc.php |
|---|
| 863 | =================================================================== |
|---|
| 864 | --- wp-includes/js/tinymce/plugins/spellchecker/rpc.php (wersja 21273) |
|---|
| 865 | +++ wp-includes/js/tinymce/plugins/spellchecker/rpc.php (kopia robocza) |
|---|
| 866 | @@ -10,13 +10,13 @@ |
|---|
| 867 | require_once("./includes/general.php"); |
|---|
| 868 | |
|---|
| 869 | // Set RPC response headers |
|---|
| 870 | -header('Content-Type: text/plain'); |
|---|
| 871 | -header('Content-Encoding: UTF-8'); |
|---|
| 872 | -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
|---|
| 873 | -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|---|
| 874 | -header("Cache-Control: no-store, no-cache, must-revalidate"); |
|---|
| 875 | -header("Cache-Control: post-check=0, pre-check=0", false); |
|---|
| 876 | -header("Pragma: no-cache"); |
|---|
| 877 | +wp_header( 'Content-Type: text/plain' ); |
|---|
| 878 | +wp_header( 'Content-Encoding: UTF-8' ); |
|---|
| 879 | +wp_header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); |
|---|
| 880 | +wp_header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" ); |
|---|
| 881 | +wp_header( "Cache-Control: no-store, no-cache, must-revalidate" ); |
|---|
| 882 | +wp_header( "Cache-Control: post-check=0, pre-check=0", false ); |
|---|
| 883 | +wp_header( "Pragma: no-cache" ); |
|---|
| 884 | |
|---|
| 885 | $raw = ""; |
|---|
| 886 | |
|---|
| 887 | Index: wp-includes/js/tinymce/wp-tinymce.php |
|---|
| 888 | =================================================================== |
|---|
| 889 | --- wp-includes/js/tinymce/wp-tinymce.php (wersja 21273) |
|---|
| 890 | +++ wp-includes/js/tinymce/wp-tinymce.php (kopia robocza) |
|---|
| 891 | @@ -21,15 +21,15 @@ |
|---|
| 892 | |
|---|
| 893 | $expires_offset = 31536000; |
|---|
| 894 | |
|---|
| 895 | -header('Content-Type: application/x-javascript; charset=UTF-8'); |
|---|
| 896 | -header('Vary: Accept-Encoding'); // Handle proxies |
|---|
| 897 | -header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
|---|
| 898 | -header("Cache-Control: public, max-age=$expires_offset"); |
|---|
| 899 | +wp_header( 'Content-Type: application/x-javascript; charset=UTF-8' ); |
|---|
| 900 | +wp_header( 'Vary: Accept-Encoding' ); // Handle proxies |
|---|
| 901 | +wp_header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT' ); |
|---|
| 902 | +wp_header( "Cache-Control: public, max-age=$expires_offset" ); |
|---|
| 903 | |
|---|
| 904 | if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING']) |
|---|
| 905 | && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) { |
|---|
| 906 | |
|---|
| 907 | - header('Content-Encoding: gzip'); |
|---|
| 908 | + wp_header( 'Content-Encoding: gzip' ); |
|---|
| 909 | echo $file; |
|---|
| 910 | } else { |
|---|
| 911 | echo get_file($basepath . '/tiny_mce.js'); |
|---|
| 912 | Index: wp-includes/load.php |
|---|
| 913 | =================================================================== |
|---|
| 914 | --- wp-includes/load.php (wersja 21273) |
|---|
| 915 | +++ wp-includes/load.php (kopia robocza) |
|---|
| 916 | @@ -122,8 +122,8 @@ |
|---|
| 917 | */ |
|---|
| 918 | function wp_favicon_request() { |
|---|
| 919 | if ( '/favicon.ico' == $_SERVER['REQUEST_URI'] ) { |
|---|
| 920 | - header('Content-Type: image/vnd.microsoft.icon'); |
|---|
| 921 | - header('Content-Length: 0'); |
|---|
| 922 | + wp_header( 'Content-Type: image/vnd.microsoft.icon' ); |
|---|
| 923 | + wp_header( 'Content-Length: 0' ); |
|---|
| 924 | exit; |
|---|
| 925 | } |
|---|
| 926 | } |
|---|
| 927 | @@ -163,9 +163,9 @@ |
|---|
| 928 | $protocol = $_SERVER["SERVER_PROTOCOL"]; |
|---|
| 929 | if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) |
|---|
| 930 | $protocol = 'HTTP/1.0'; |
|---|
| 931 | - header( "$protocol 503 Service Unavailable", true, 503 ); |
|---|
| 932 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 933 | - header( 'Retry-After: 600' ); |
|---|
| 934 | + wp_header( "$protocol 503 Service Unavailable", true, 503 ); |
|---|
| 935 | + wp_header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 936 | + wp_header( 'Retry-After: 600' ); |
|---|
| 937 | ?> |
|---|
| 938 | <!DOCTYPE html> |
|---|
| 939 | <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>> |
|---|
| 940 | Index: wp-includes/feed-atom-comments.php |
|---|
| 941 | =================================================================== |
|---|
| 942 | --- wp-includes/feed-atom-comments.php (wersja 21273) |
|---|
| 943 | +++ wp-includes/feed-atom-comments.php (kopia robocza) |
|---|
| 944 | @@ -5,7 +5,7 @@ |
|---|
| 945 | * @package WordPress |
|---|
| 946 | */ |
|---|
| 947 | |
|---|
| 948 | -header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true); |
|---|
| 949 | +wp_header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 950 | echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'; |
|---|
| 951 | ?> |
|---|
| 952 | <feed |
|---|
| 953 | Index: wp-includes/feed-rss2.php |
|---|
| 954 | =================================================================== |
|---|
| 955 | --- wp-includes/feed-rss2.php (wersja 21273) |
|---|
| 956 | +++ wp-includes/feed-rss2.php (kopia robocza) |
|---|
| 957 | @@ -5,7 +5,7 @@ |
|---|
| 958 | * @package WordPress |
|---|
| 959 | */ |
|---|
| 960 | |
|---|
| 961 | -header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); |
|---|
| 962 | +wp_header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 963 | $more = 1; |
|---|
| 964 | |
|---|
| 965 | echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> |
|---|
| 966 | Index: wp-includes/feed-atom.php |
|---|
| 967 | =================================================================== |
|---|
| 968 | --- wp-includes/feed-atom.php (wersja 21273) |
|---|
| 969 | +++ wp-includes/feed-atom.php (kopia robocza) |
|---|
| 970 | @@ -5,7 +5,7 @@ |
|---|
| 971 | * @package WordPress |
|---|
| 972 | */ |
|---|
| 973 | |
|---|
| 974 | -header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true); |
|---|
| 975 | +wp_header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 976 | $more = 1; |
|---|
| 977 | |
|---|
| 978 | echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> |
|---|
| 979 | Index: wp-includes/feed-rss2-comments.php |
|---|
| 980 | =================================================================== |
|---|
| 981 | --- wp-includes/feed-rss2-comments.php (wersja 21273) |
|---|
| 982 | +++ wp-includes/feed-rss2-comments.php (kopia robocza) |
|---|
| 983 | @@ -5,7 +5,7 @@ |
|---|
| 984 | * @package WordPress |
|---|
| 985 | */ |
|---|
| 986 | |
|---|
| 987 | -header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); |
|---|
| 988 | +wp_header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 989 | |
|---|
| 990 | echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; |
|---|
| 991 | ?> |
|---|
| 992 | Index: xmlrpc.php |
|---|
| 993 | =================================================================== |
|---|
| 994 | --- xmlrpc.php (wersja 21273) |
|---|
| 995 | +++ xmlrpc.php (kopia robocza) |
|---|
| 996 | @@ -29,7 +29,7 @@ |
|---|
| 997 | include('./wp-load.php'); |
|---|
| 998 | |
|---|
| 999 | if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd |
|---|
| 1000 | -header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); |
|---|
| 1001 | +wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 1002 | ?> |
|---|
| 1003 | <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?> |
|---|
| 1004 | <rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd"> |
|---|
| 1005 | Index: wp-links-opml.php |
|---|
| 1006 | =================================================================== |
|---|
| 1007 | --- wp-links-opml.php (wersja 21273) |
|---|
| 1008 | +++ wp-links-opml.php (kopia robocza) |
|---|
| 1009 | @@ -14,7 +14,7 @@ |
|---|
| 1010 | |
|---|
| 1011 | require_once('./wp-load.php'); |
|---|
| 1012 | |
|---|
| 1013 | -header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); |
|---|
| 1014 | +wp_header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); |
|---|
| 1015 | $link_cat = ''; |
|---|
| 1016 | if ( !empty($_GET['link_cat']) ) { |
|---|
| 1017 | $link_cat = $_GET['link_cat']; |
|---|
| 1018 | Index: wp-login.php |
|---|
| 1019 | =================================================================== |
|---|
| 1020 | --- wp-login.php (wersja 21273) |
|---|
| 1021 | +++ wp-login.php (kopia robocza) |
|---|
| 1022 | @@ -359,7 +359,7 @@ |
|---|
| 1023 | |
|---|
| 1024 | nocache_headers(); |
|---|
| 1025 | |
|---|
| 1026 | -header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset')); |
|---|
| 1027 | +wp_header( 'Content-Type: '.get_bloginfo( 'html_type' ).'; charset='.get_bloginfo( 'charset' ) ); |
|---|
| 1028 | |
|---|
| 1029 | if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set |
|---|
| 1030 | if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) |
|---|
| 1031 | Index: wp-comments-post.php |
|---|
| 1032 | =================================================================== |
|---|
| 1033 | --- wp-comments-post.php (wersja 21273) |
|---|
| 1034 | +++ wp-comments-post.php (kopia robocza) |
|---|
| 1035 | @@ -6,9 +6,9 @@ |
|---|
| 1036 | */ |
|---|
| 1037 | |
|---|
| 1038 | if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { |
|---|
| 1039 | - header('Allow: POST'); |
|---|
| 1040 | - header('HTTP/1.1 405 Method Not Allowed'); |
|---|
| 1041 | - header('Content-Type: text/plain'); |
|---|
| 1042 | + wp_header( 'Allow: POST' ); |
|---|
| 1043 | + wp_header( 'HTTP/1.1 405 Method Not Allowed' ); |
|---|
| 1044 | + wp_header( 'Content-Type: text/plain' ); |
|---|
| 1045 | exit; |
|---|
| 1046 | } |
|---|
| 1047 | |
|---|