web/wp-includes/class-wp-ajax-response.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
   124 	 * Sets the content type header to text/xml.
   124 	 * Sets the content type header to text/xml.
   125 	 *
   125 	 *
   126 	 * @since 2.1.0
   126 	 * @since 2.1.0
   127 	 */
   127 	 */
   128 	function send() {
   128 	function send() {
   129 		header('Content-Type: text/xml');
   129 		header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
   130 		echo "<?xml version='1.0' standalone='yes'?><wp_ajax>";
   130 		echo "<?xml version='1.0' encoding='" . get_option( 'blog_charset' ) . "' standalone='yes'?><wp_ajax>";
   131 		foreach ( (array) $this->responses as $response )
   131 		foreach ( (array) $this->responses as $response )
   132 			echo $response;
   132 			echo $response;
   133 		echo '</wp_ajax>';
   133 		echo '</wp_ajax>';
   134 		if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
   134 		if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
   135 			wp_die();
   135 			wp_die();