Send the content-type header with correct encoding
Description
This method ensures that the SimplePie-enabled page is being served with the correct <a href="http://www.iana.org/assignments/media-types/">http://www.iana.org/assignments/media-types/</a> mime-type and character encoding HTTP headers (character encoding determined by the set_output_encoding config option). This won't work properly if any content or whitespace has already been sent to the browser, because it relies on PHP's <a href="http://php.net/header">http://php.net/header</a> header() function, and these are the circumstances under which the function works. Because it's setting these settings for the entire page (as is the nature of HTTP headers), this should only be used once per page (again, at the top).
Parameters
$mimestringoptional
MIME type to serve the page asDefault: 'text/html'
Signature, return type and hooks compared across 5 parsed releases.
6.9.7
Return type changed from none to void.verified against source
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/SimplePie/src/SimplePie.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.