wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
wp_sanitize_script_attributes is deprecated since version 7.0.0!
Alternative: Ver página de detalhe para wp_get_script_tag »" href="https://pt.wpseek.com/function/wp_get_script_tag/">wp_get_script_tag() or Ver página de detalhe para wp_get_inline_script_tag »" href="https://pt.wpseek.com/function/wp_get_inline_script_tag/">wp_get_inline_script_tag()
Alternative: Ver página de detalhe para wp_get_script_tag »" href="https://pt.wpseek.com/function/wp_get_script_tag/">wp_get_script_tag() or Ver página de detalhe para wp_get_inline_script_tag »" href="https://pt.wpseek.com/function/wp_get_inline_script_tag/">wp_get_inline_script_tag()
wp_sanitize_script_attributes › WordPress Function
Desde5.7.0
Obsoleto7.0.0
› wp_sanitize_script_attributes ( $attributes )
| Parâmetros: |
|
| Ver: | |
| Retorna: |
|
| Definido em: |
|
| Codex: |
Sanitizes an attributes array into an attributes string to be placed inside a `<script>` tag.
This function is deprecated, use Ver página de detalhe para wp_get_script_tag »" href="https://pt.wpseek.com/function/%5Cwp_get_script_tag/">wp_get_script_tag or Ver página de detalhe para wp_get_inline_script_tag »" href="https://pt.wpseek.com/function/%5Cwp_get_inline_script_tag/">wp_get_inline_script_tag instead.Fonte
function wp_sanitize_script_attributes( $attributes ) {
_deprecated_function( __FUNCTION__, '7.0.0', 'wp_get_script_tag() or wp_get_inline_script_tag()' );
$attributes_string = '';
foreach ( $attributes as $attribute_name => $attribute_value ) {
if ( is_bool( $attribute_value ) ) {
if ( $attribute_value ) {
$attributes_string .= ' ' . esc_attr( $attribute_name );
}
} else {
$attributes_string .= sprintf( ' %1$s="%2$s"', esc_attr( $attribute_name ), esc_attr( $attribute_value ) );
}
}
return $attributes_string;
}