WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Pelago\Emogrifier

CssInliner::removeImportantAnnotationFromNodeInlineStyle() private WC 1.0

Removes the "!important" annotations out of the inline style declarations, eventually by rearranging declarations. Rearranging needed when !important shorthand properties are followed by some of their not !important expanded-version properties. For example "font: 12px serif !important; font-size: 13px;" must be reordered to "font-size: 13px; font: 12px serif;" in order to remain correct.

Это метод класса: CssInliner{}

Хуков нет.

Возвращает

null.

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

// private - только в коде основоного (родительского) класса
$result = $this->removeImportantAnnotationFromNodeInlineStyle( \DOMElement $node );
$node(\DOMElement) (обязательный)

Код CssInliner::removeImportantAnnotationFromNodeInlineStyle() WC 4.5.2

woocommerce/vendor/pelago/emogrifier/src/Emogrifier/CssInliner.php
<?php
private function removeImportantAnnotationFromNodeInlineStyle(\DOMElement $node)
{
    $inlineStyleDeclarations = $this->parseCssDeclarationsBlock($node->getAttribute('style'));
    $regularStyleDeclarations = [];
    $importantStyleDeclarations = [];
    foreach ($inlineStyleDeclarations as $property => $value) {
        if ($this->attributeValueIsImportant($value)) {
            $importantStyleDeclarations[$property] = \trim(\str_replace('!important', '', $value));
        } else {
            $regularStyleDeclarations[$property] = $value;
        }
    }
    $inlineStyleDeclarationsInNewOrder = \array_merge(
        $regularStyleDeclarations,
        $importantStyleDeclarations
    );
    $node->setAttribute(
        'style',
        $this->generateStyleStringFromSingleDeclarationsArray($inlineStyleDeclarationsInNewOrder)
    );
}