W3cubDocs

/WordPress

IXR_Server::output( $xml )

Source

function output($xml)
{
    $charset = function_exists('get_option') ? get_option('blog_charset') : '';
    if ($charset)
        $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml;
    else
        $xml = '<?xml version="1.0"?>'."\n".$xml;
    $length = strlen($xml);
    header('Connection: close');
    if ($charset)
        header('Content-Type: text/xml; charset='.$charset);
    else
        header('Content-Type: text/xml');
    header('Date: '.gmdate('r'));
    echo $xml;
    exit;
}

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/ixr_server/output