wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_specialchars › WordPress Function

Odn/a
Przestarzały2.8.0
wp_specialchars ( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
Parametry: (4)
  • (string) $text Text to escape.
    Wymagane: Tak
  • (string) $quote_style Unused.
    Wymagane: Nie
    Domyślny: ENT_NOQUOTES
  • (false|string) $charset Unused.
    Wymagane: Nie
    Domyślny: false
  • (false) $double_encode Whether to double encode. Unused.
    Wymagane: Nie
    Domyślny: false
Zobacz:
Powrót:
  • (string) Escaped `$text`.
Zdefiniowane na:
Codex:

Legacy escaping for HTML blocks.



Źródło

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