WP_Ajax_Response::send

Advertisement

Summery Summery

Display XML formatted responses.

Syntax Syntax

WP_Ajax_Response::send()

Description Description

Sets the content type header to text/xml.

Source Source

File: wp-includes/class-wp-ajax-response.php

	 */
	public function send() {
		header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
		echo "<?xml version='1.0' encoding='" . get_option( 'blog_charset' ) . "' standalone='yes'?><wp_ajax>";
		foreach ( (array) $this->responses as $response ) {
			echo $response;
		}
		echo '</wp_ajax>';
		if ( wp_doing_ajax() ) {
			wp_die();
		} else {
			die();
		}

Advertisement

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Advertisement

Leave a Reply