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

Filters a CSS property + value pair.


Parameters

$property string Required
The CSS property.
$value string Required
The value to be filtered.
$spacer string Optional
The spacer between the colon and the value.

Default: ''


Top ↑

Return

string The filtered declaration or an empty string.


Top ↑

Source

File: wp-includes/style-engine/class-wp-style-engine-css-declarations.php. View all references

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 '';
}


Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

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