wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_specialchars › WordPress Function

Depuisn/a
Dépréciée2.8.0
wp_specialchars ( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
Paramètres: (4)
  • (string) $text Text to escape.
    Requis: Oui
  • (string) $quote_style Unused.
    Requis: Non
    Défaut: ENT_NOQUOTES
  • (false|string) $charset Unused.
    Requis: Non
    Défaut: false
  • (false) $double_encode Whether to double encode. Unused.
    Requis: Non
    Défaut: false
Voir:
Retourne:
  • (string) Escaped `$text`.
Défini(e) dans:
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 );
	}
}