| | 5935 | |
| | 5936 | function output( $xml ) { |
| | 5937 | $charset = function_exists('get_option') ? get_option('blog_charset') : ''; |
| | 5938 | |
| | 5939 | if ( $charset ) { |
| | 5940 | $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml; |
| | 5941 | } else { |
| | 5942 | $xml = '<?xml version="1.0"?>' . "\n" . $xml; |
| | 5943 | } |
| | 5944 | |
| | 5945 | header( 'Connection: close' ); |
| | 5946 | |
| | 5947 | if( $charset ) { |
| | 5948 | header( 'Content-Type: text/xml; charset=' . $charset ); |
| | 5949 | } else { |
| | 5950 | header( 'Content-Type: text/xml' ); |
| | 5951 | } |
| | 5952 | |
| | 5953 | header( 'Date: ' . date_i18n( 'r' ) ); |
| | 5954 | |
| | 5955 | echo $xml; |
| | 5956 | |
| | 5957 | exit; |
| | 5958 | } |
| | 5959 | |