Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_specialchars ›

Dan/a
Deprecato2.8.0
wp_specialchars ( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
Parametri: (4)
  • (string) $string String to escape.
    Richiesto:
  • (string) $quote_style Unused.
    Richiesto: No
    Default: ENT_NOQUOTES
  • (false|string) $charset Unused.
    Richiesto: No
    Default: false
  • (false) $double_encode Whether to double encode. Unused.
    Richiesto: No
    Default: false
Vedi:
Ritorna:
  • (string) Escaped `$string`.
Definito a:
Codex:

Legacy escaping for HTML blocks.



Sorgenti

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