wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_is_document_isolation_policy_supported › WordPress Function

Since7.2.0
Deprecatedn/a
› wp_is_document_isolation_policy_supported ( No parameters )
Returns:
  • (bool) True when the browser is Chromium 137 or newer.
Defined at:
Codex:

Determines whether the current request's browser honors the Document-Isolation-Policy header.

Document-Isolation-Policy is how WordPress makes a page cross-origin isolated for client-side media processing. Chromium 137+ is the only engine that implements it; other browsers ignore the header, so the page never becomes isolated and the client-side pipeline cannot run.


Source

function wp_is_document_isolation_policy_supported(): bool {
	$chromium_version = wp_get_chromium_major_version();

	return null !== $chromium_version && $chromium_version >= 137;
}