Changeset 46109 for trunk/src/wp-includes/functions.php
- Timestamp:
- 09/14/2019 03:41:02 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r46107 r46109 3077 3077 * an integer to be used as the response code. 3078 3078 * @since 5.1.0 The `$link_url`, `$link_text`, and `$exit` arguments were added. 3079 * @since 5.3.0 The `$charset` argument was added. 3079 3080 * 3080 3081 * @global WP_Query $wp_query WordPress Query object. … … 3100 3101 * is still loading and the site's locale is not set up yet. Accepts 'rtl'. 3101 3102 * Default is the value of is_rtl(). 3103 * @type string $charset Character set of the HTML output. Default 'utf-8'. 3102 3104 * @type string $code Error code to use. Default is 'wp_die', or the main error code if $message 3103 3105 * is a WP_Error. … … 3227 3229 if ( ! did_action( 'admin_head' ) ) : 3228 3230 if ( ! headers_sent() ) { 3229 header( 'Content-Type: text/html; charset=utf-8');3231 header( "Content-Type: text/html; charset={$parsed_args['charset']}" ); 3230 3232 status_header( $parsed_args['response'] ); 3231 3233 nocache_headers(); … … 3242 3244 <html xmlns="http://www.w3.org/1999/xhtml" <?php echo $dir_attr; ?>> 3243 3245 <head> 3244 <meta http-equiv="Content-Type" content="text/html; charset= utf-8" />3246 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $parsed_args['charset']; ?>" /> 3245 3247 <meta name="viewport" content="width=device-width"> 3246 3248 <?php … … 3446 3448 3447 3449 if ( ! headers_sent() ) { 3448 header( 'Content-Type: application/json; charset=utf-8');3450 header( "Content-Type: application/json; charset={$parsed_args['charset']}" ); 3449 3451 if ( null !== $parsed_args['response'] ) { 3450 3452 status_header( $parsed_args['response'] ); … … 3484 3486 3485 3487 if ( ! headers_sent() ) { 3486 header( 'Content-Type: application/javascript; charset=utf-8');3488 header( "Content-Type: application/javascript; charset={$parsed_args['charset']}" ); 3487 3489 header( 'X-Content-Type-Options: nosniff' ); 3488 3490 header( 'X-Robots-Tag: noindex' ); … … 3564 3566 3565 3567 if ( ! headers_sent() ) { 3566 header( 'Content-Type: text/xml; charset=utf-8');3568 header( "Content-Type: text/xml; charset={$parsed_args['charset']}" ); 3567 3569 if ( null !== $parsed_args['response'] ) { 3568 3570 status_header( $parsed_args['response'] ); … … 3625 3627 'link_text' => '', 3626 3628 'text_direction' => '', 3629 'charset' => 'utf-8', 3627 3630 'additional_errors' => array(), 3628 3631 ); … … 3678 3681 $args['text_direction'] = 'rtl'; 3679 3682 } 3683 } 3684 3685 if ( ! empty( $args['charset'] ) ) { 3686 $args['charset'] = _canonical_charset( $args['charset'] ); 3680 3687 } 3681 3688
Note: See TracChangeset
for help on using the changeset viewer.