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

SimplePie_Content_Type_Sniffer::get_type() public WP 1.0

Get the Content-Type of the specified file

{} Это метод класса: SimplePie_Content_Type_Sniffer{}

Хуков нет.

Возвращает

Строку. Actual Content-Type

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

$SimplePie_Content_Type_Sniffer = new SimplePie_Content_Type_Sniffer();
$SimplePie_Content_Type_Sniffer->get_type();

Код SimplePie_Content_Type_Sniffer::get_type() WP 5.5.3

<?php
public function get_type()
{
	if (isset($this->file->headers['content-type']))
	{
		if (!isset($this->file->headers['content-encoding'])
			&& ($this->file->headers['content-type'] === 'text/plain'
				|| $this->file->headers['content-type'] === 'text/plain; charset=ISO-8859-1'
				|| $this->file->headers['content-type'] === 'text/plain; charset=iso-8859-1'
				|| $this->file->headers['content-type'] === 'text/plain; charset=UTF-8'))
		{
			return $this->text_or_binary();
		}

		if (($pos = strpos($this->file->headers['content-type'], ';')) !== false)
		{
			$official = substr($this->file->headers['content-type'], 0, $pos);
		}
		else
		{
			$official = $this->file->headers['content-type'];
		}
		$official = trim(strtolower($official));

		if ($official === 'unknown/unknown'
			|| $official === 'application/unknown')
		{
			return $this->unknown();
		}
		elseif (substr($official, -4) === '+xml'
			|| $official === 'text/xml'
			|| $official === 'application/xml')
		{
			return $official;
		}
		elseif (substr($official, 0, 6) === 'image/')
		{
			if ($return = $this->image())
			{
				return $return;
			}

			return $official;
		}
		elseif ($official === 'text/html')
		{
			return $this->feed_or_html();
		}

		return $official;
	}

	return $this->unknown();
}