WP HOOKS
filtrod 5.5.0

safecss_filter_attr_allow_css

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

Opis — z kodu źródłowego

Filters the check for unsafe CSS in `safecss_filter_attr`.

Enables developers to determine whether a section of CSS should be allowed or discarded. By default, the value will be false if the part contains \ ( & } = or comments. Return true to allow the CSS part to be included in the output.

Parametry

ParametrTypOpis
$allow_cssboolWhether the CSS in the test string is considered safe.
$css_test_stringstringThe CSS string to test.

Wywołanie

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

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

Popularne w tej kategorii