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



wp_specialchars › WordPress Function

Desden/a
Obsoleto2.8.0
wp_specialchars ( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
Parâmetros: (4)
  • (string) $text Text 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 `$text`.
Definido em:
Codex:

Legacy escaping for HTML blocks.



Fonte

function wp_specialchars( $text, $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.
		return _wp_specialchars( $text, $quote_style, $charset, $double_encode );
	} else {
		return esc_html( $text );
	}
}