Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor
CssToAttributeConverter::mapCssToHtmlAttributes
Applies $styles to $node.
This method maps CSS styles to HTML attributes and adds those to the node.
Метод класса: CssToAttributeConverter{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->mapCssToHtmlAttributes( $styles, $node ): void;
- $styles(массив) (обязательный)
- .
- $node(DOMElement) (обязательный)
- node to apply styles to.
Код CssToAttributeConverter::mapCssToHtmlAttributes() CssToAttributeConverter::mapCssToHtmlAttributes WC 10.4.3
private function mapCssToHtmlAttributes(array $styles, \DOMElement $node): void
{
foreach ($styles as $property => $value) {
// Strip !important indicator
$value = \trim(\str_replace('!important', '', $value));
$this->mapCssToHtmlAttribute($property, $value, $node);
}
}