wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_specialchars › WordPress Function

Sincen/a
Deprecated2.8.0
wp_specialchars ( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
Parameters: (4)
  • (string) $text Text to escape.
    Required: Yes
  • (string) $quote_style Unused.
    Required: No
    Default: ENT_NOQUOTES
  • (false|string) $charset Unused.
    Required: No
    Default: false
  • (false) $double_encode Whether to double encode. Unused.
    Required: No
    Default: false
See:
Returns:
  • (string) Escaped `$text`.
Defined at:
Codex:

Legacy escaping for HTML blocks.



Source

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 );
	}
}