wp_specialchars

Definition:
function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {}

Escaping for HTML blocks.

Parameters

  • $string
  • $quote_style
  • $charset
  • $double_encode

Source code

function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {

	_deprecated_function( __FUNCTION__, '2.8', 'esc_html()' );

	if ( func_num_args() > 1 ) { // Maintain backwards compat for people passing additional args

		$args = func_get_args();

		return call_user_func_array( '_wp_specialchars', $args );

	} else {

		return esc_html( $string );

	}

}

4135

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: