WP_Theme_JSON::is_safe_css_declaration( string $property_name, string $property_value ): bool

In this article

Checks that a declaration provided by the user is safe.

Parameters

$property_namestringrequired
Property name in a CSS declaration, i.e. the color in color: red.
$property_valuestringrequired
Value in a CSS declaration, i.e. the red in color: red.

Return

bool

Source

* @param array      $data          The data to inspect.
* @param bool|array $path          Boolean or path to a boolean.
* @param bool       $default_value Default value if the referenced path is missing.
*                                  Default false.
* @return bool Value of boolean metadata.

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.