wp-includes/SimplePie/src/Content/Type/Sniffer.php:106Sniff text or binary
string public function text_or_binary() { $body = $this->file->get_body_content(); if (substr($body, 0, 2) === "\xFE\xFF" || substr($body, 0, 2) === "\xFF\xFE" || substr($body, 0, 4) === "\x00\x00\xFE\xFF" || substr($body, 0, 3) === "\xEF\xBB\xBF") { return 'text/plain'; } elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $body)) { return 'application/octet-stream'; } return 'text/plain'; }Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/SimplePie/src/Content/Type/Sniffer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.