WordPress at Your Fingertips
function is not described

trackback_response() WP 0.71

Response to a trackback.

Responds with an error or success XML message.

No Hooks.

Return

null. Nothing.

Usage

trackback_response( $error, $error_message );
$error(int|true|false)
Whether there was an error. Accepts '0' or '1', true or false.
Default: '0'
$error_message(string)
Error message if an error occurred.
Default: ''

Changelog

Since 0.71 Introduced.

Code of trackback_response() WP 5.8.2

function trackback_response( $error = 0, $error_message = '' ) {
	header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
	if ( $error ) {
		echo '<?xml version="1.0" encoding="utf-8"?' . ">\n";
		echo "<response>\n";
		echo "<error>1</error>\n";
		echo "<message>$error_message</message>\n";
		echo '</response>';
		die();
	} else {
		echo '<?xml version="1.0" encoding="utf-8"?' . ">\n";
		echo "<response>\n";
		echo "<error>0</error>\n";
		echo '</response>';
	}
}