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:
''
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
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.