trackback_response() – Response to a trackback.

You appear to be a bot. Output may be restricted

Description

Response to a trackback.

Responds with an error or success XML message.

Usage

trackback_response( $error, $error_message );

Parameters

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

Returns

void

Source

File name: wordpress/wp-trackback.php


Lines:

1 to 18 of 18
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>';
  }
}
 

 View on GitHub View on Trac