Automattic\WooCommerce\Vendor\Pelago\Emogrifier

CssInliner::getAllNodesWithStyleAttributeprivateWC 1.0

Returns a list with all DOM nodes that have a style attribute.

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

Хуков нет.

Возвращает

\DOMNodeList.

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

// private - только в коде основоного (родительского) класса
$result = $this->getAllNodesWithStyleAttribute(): \DOMNodeList;

Код CssInliner::getAllNodesWithStyleAttribute() WC 10.4.3

private function getAllNodesWithStyleAttribute(): \DOMNodeList
{
    $query = '//*[@style]';
    $matches = $this->getXPath()->query($query);
    if (!$matches instanceof \DOMNodeList) {
        throw new \RuntimeException('XPatch query failed: ' . $query, 1618577797);
    }

    return $matches;
}