WP HOOKS
filtrod 2.8.0

esc_html

Args 2Plik wp-includes/formatting.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters a string cleaned and escaped for output in HTML.

Text passed to esc_html() is stripped of invalid or special characters before output.

Parametry

ParametrTypOpis
$safe_textstringThe text after it has been escaped.
$textstringThe text prior to being escaped.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'esc_html', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii