wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_is_cross_origin_isolated_request › WordPress Function

Od7.2.0
Przestarzałyn/a
› wp_is_cross_origin_isolated_request ( Brak parametrów )
Powrót:
  • (bool) True when the response will be cross-origin isolated.
Zdefiniowane na:
Codex:

Whether the current request has been set up for cross-origin isolation.

True once wp_send_document_isolation_policy_header() has sent the Document-Isolation-Policy header for the screen being rendered, which is what lets scripts that need a cross-origin isolated page, such as the client-side media upload integration, decide whether to load at all. A header a plugin sends itself does not count, since the plugin may isolate its screen for reasons of its own. To run the client-side pipeline on a screen core does not isolate, call wp_send_document_isolation_policy_header() before wp_enqueue_media().


Źródło

function wp_is_cross_origin_isolated_request(): bool {
	global $_wp_cross_origin_isolated;

	return true === $_wp_cross_origin_isolated;
}