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



wp_specialchars ›

Desden/a
Obsoleto2.8.0
wp_specialchars ( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
Parâmetros: (4)
  • (string) $string String to escape.
    Required: Yes
  • (string) $quote_style Unused.
    Required: No
    Padrão: ENT_NOQUOTES
  • (false|string) $charset Unused.
    Required: No
    Padrão: false
  • (false) $double_encode Whether to double encode. Unused.
    Required: No
    Padrão: false
Ver:
Retorna:
  • (string) Escaped `$string`.
Definido em:
Codex:

Legacy escaping for HTML blocks.



Fonte

function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
	if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
		$args = func_get_args();
		return call_user_func_array( '_wp_specialchars', $args );
	} else {
		return esc_html( $string );
	}
}