wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_add_crossorigin_attributes › WordPress Function

Desde7.1.0
Obsoleto7.2.0
› wp_add_crossorigin_attributes ( $html )
Parâmetros:
  • (string) $html HTML input.
    Required: Yes
Retorna:
  • (string) The unmodified HTML.
Definido em:
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.


Fonte

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

	return $html;
}