Filter hook 'safecss_filter_attr_allow_css'

in WP Core File wp-includes/kses.php at line 2680

Description

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.

Occurrences

Filename Line Number
wp-includes/kses.php 2680

Parameters

Type Name Description
bool $allow_css Whether the CSS in the test string is considered safe.
string $css_test_string The CSS string to test.

PHP Doc

/**
			 * 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.
			 *
			 * @since 5.5.0
			 *
			 * @param bool   $allow_css       Whether the CSS in the test string is considered safe.
			 * @param string $css_test_string The CSS string to test.
			 */