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:
''
Return
string The filtered declaration or an empty string.
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 '';
}
Changelog
Version | Description |
---|---|
6.1.0 | Introduced. |