"; } $s = ''; if ( is_array( $parsed_args['supplemental'] ) ) { foreach ( $parsed_args['supplemental'] as $k => $v ) { $s .= "<$k>"; } $s = "$s"; } if ( false === $action ) { $action = $_POST['action']; } $x = ''; $x .= ""; // The action attribute in the xml output is formatted like a nonce action. $x .= "<$what id='$id' " . ( false === $old_id ? '' : "old_id='$old_id' " ) . "position='$position'>"; $x .= $response; $x .= $s; $x .= ""; $x .= ''; $this->responses[] = $x; return $x; } /** * Display XML formatted responses. * * Sets the content type header to text/xml. * * @since 2.1.0 */ public function send() { header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) ); echo ""; foreach ( (array) $this->responses as $response ) { echo $response; } echo ''; if ( wp_doing_ajax() ) { wp_die(); } else { die(); } } }