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



wp_add_crossorigin_attributes › WordPress Function

Od7.1.0
Przestarzały7.2.0
› wp_add_crossorigin_attributes ( $html )
Parametry:
  • (string) $html HTML input.
    Wymagane: Tak
Powrót:
  • (string) The unmodified HTML.
Zdefiniowane na:
Codex:

Adds crossorigin="anonymous" to relevant tags in the given HTML string.

No longer modifies the HTML. Under Document-Isolation-Policy: isolate-and-credentialless cross-origin resources load without the attribute, and adding it broke resources served without CORS headers.


Źródło

function wp_add_crossorigin_attributes( string $html ): string {
	_deprecated_function( __FUNCTION__, '7.2.0' );

	return $html;
}