WP_Style_Engine_CSS_Declarations::filter_declaration( string $property, string $value, string $spacer =  ): string

In this article

Filters a CSS property + value pair.

Parameters

$propertystringrequired
The CSS property.
$valuestringrequired
The value to be filtered.
$spacerstringoptional
The spacer between the colon and the value.

Default:''

Return

string The filtered declaration or an empty string.

Source

protected static function filter_declaration( $property, $value, $spacer = '' ) {
	$filtered_value = wp_strip_all_tags( $value, true );
	if ( '' !== $filtered_value ) {
		return safecss_filter_attr( "{$property}:{$spacer}{$filtered_value}" );
	}
	return '';
}

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

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