safecss_filter_attr_allow_css WordPress Filter Hook

The safecss_filter_attr_allow_css hook is used to allow certain CSS properties to be used in a style attribute.

apply_filters( 'safecss_filter_attr_allow_css', bool $allow_css, string $css_test_string ) #

Filters the check for unsafe CSS in safecss_filter_attr.


Description

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.


Top ↑

Parameters

$allow_css

(bool)Whether the CSS in the test string is considered safe.

$css_test_string

(string)The CSS string to test.


Top ↑

Source

File: wp-includes/kses.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.