equal
deleted
inserted
replaced
7 * @package WordPress |
7 * @package WordPress |
8 * @subpackage Trackbacks |
8 * @subpackage Trackbacks |
9 */ |
9 */ |
10 |
10 |
11 if ( empty( $wp ) ) { |
11 if ( empty( $wp ) ) { |
12 require_once( dirname( __FILE__ ) . '/wp-load.php' ); |
12 require_once __DIR__ . '/wp-load.php'; |
13 wp( array( 'tb' => '1' ) ); |
13 wp( array( 'tb' => '1' ) ); |
14 } |
14 } |
15 |
15 |
16 /** |
16 /** |
17 * Response to a trackback. |
17 * Response to a trackback. |
18 * |
18 * |
19 * Responds with an error or success XML message. |
19 * Responds with an error or success XML message. |
20 * |
20 * |
21 * @since 0.71 |
21 * @since 0.71 |
22 * |
22 * |
23 * @param mixed $error Whether there was an error. |
23 * @param int|bool $error Whether there was an error. |
24 * Default '0'. Accepts '0' or '1', true or false. |
24 * Default '0'. Accepts '0' or '1', true or false. |
25 * @param string $error_message Error message if an error occurred. |
25 * @param string $error_message Error message if an error occurred. |
26 */ |
26 */ |
27 function trackback_response( $error = 0, $error_message = '' ) { |
27 function trackback_response( $error = 0, $error_message = '' ) { |
28 header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) ); |
28 header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) ); |
29 if ( $error ) { |
29 if ( $error ) { |
30 echo '<?xml version="1.0" encoding="utf-8"?' . ">\n"; |
30 echo '<?xml version="1.0" encoding="utf-8"?' . ">\n"; |