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

SimplePie_Content_Type_Sniffer::unknown() public WP 1.0

Sniff unknown

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

Хуков нет.

Возвращает

Строку. Actual Content-Type

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

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

Код SimplePie_Content_Type_Sniffer::unknown() WP 5.5.3

<?php
public function unknown()
{
	$ws = strspn($this->file->body, "\x09\x0A\x0B\x0C\x0D\x20");
	if (strtolower(substr($this->file->body, $ws, 14)) === '<!doctype html'
		|| strtolower(substr($this->file->body, $ws, 5)) === '<html'
		|| strtolower(substr($this->file->body, $ws, 7)) === '<script')
	{
		return 'text/html';
	}
	elseif (substr($this->file->body, 0, 5) === '%PDF-')
	{
		return 'application/pdf';
	}
	elseif (substr($this->file->body, 0, 11) === '%!PS-Adobe-')
	{
		return 'application/postscript';
	}
	elseif (substr($this->file->body, 0, 6) === 'GIF87a'
		|| substr($this->file->body, 0, 6) === 'GIF89a')
	{
		return 'image/gif';
	}
	elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A")
	{
		return 'image/png';
	}
	elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF")
	{
		return 'image/jpeg';
	}
	elseif (substr($this->file->body, 0, 2) === "\x42\x4D")
	{
		return 'image/bmp';
	}
	elseif (substr($this->file->body, 0, 4) === "\x00\x00\x01\x00")
	{
		return 'image/vnd.microsoft.icon';
	}

	return $this->text_or_binary();
}