WP_Style_Engine_CSS_Declarations::filter_declaration()protected staticWP 6.1.0

Filters a CSS property + value pair.

Метод класса: WP_Style_Engine_CSS_Declarations{}

Хуков нет.

Возвращает

Строку. The filtered declaration or an empty string.

Использование

$result = WP_Style_Engine_CSS_Declarations::filter_declaration( $property, $value, $spacer );
$property(строка) (обязательный)
The CSS property.
$value(строка) (обязательный)
The value to be filtered.
$spacer(строка)
The spacer between the colon and the value.
По умолчанию: empty string

Список изменений

С версии 6.1.0 Введена.

Код WP_Style_Engine_CSS_Declarations::filter_declaration() WP 6.5.2

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