wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_add_crossorigin_attributes › WordPress Function

Depuis7.1.0
Dépréciée7.2.0
› wp_add_crossorigin_attributes ( $html )
Paramètres:
  • (string) $html HTML input.
    Requis: Oui
Retourne:
  • (string) The unmodified HTML.
Défini(e) dans:
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.


Source

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

	return $html;
}