WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

SimplePie::handle_content_type() WP 1.0

Send the content-type header with correct encoding

This method ensures that the SimplePie-enabled page is being served with the correct mime-type and character encoding HTTP headers (character encoding determined by the {@see 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 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).

Это метод класса: SimplePie

Хуков нет.

Возвращает

Null. Ничего.

Использование

$SimplePie = new SimplePie();
$var = $SimplePie->handle_content_type( $mime );
$mime(строка)
MIME type to serve the page as
По умолчанию: 'text/html'

Код SimplePie::handle content type: wp-includes/class-simplepie.php WP 5.2.2

<?php
public function handle_content_type($mime = 'text/html')
{
	if (!headers_sent())
	{
		$header = "Content-type: $mime;";
		if ($this->get_encoding())
		{
			$header .= ' charset=' . $this->get_encoding();
		}
		else
		{
			$header .= ' charset=UTF-8';
		}
		header($header);
	}
}