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


CssInliner::copyUninlinableCssToStyleNode() private WC 1.0

Applies $this->matchingUninlinableCssRules to $this->domDocument by placing them as CSS in a <style> element.

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

Хуков нет.


null. Ничего.


// private - только в коде основоного (родительского) класса
$result = $this->copyUninlinableCssToStyleNode( $cssImportRules );
$cssImportRules(строка) (обязательный)
This may contain any @import rules that should precede the CSS placed in the <style> element. If there are no unlinlinable CSS rules to copy there, a <style> element will be created containing just $cssImportRules. $cssImportRules may be an empty string; if it is, and there are no unlinlinable CSS rules, an empty <style> element will not be created.

Код CssInliner::copyUninlinableCssToStyleNode() WC 5.4.1

private function copyUninlinableCssToStyleNode($cssImportRules)
    $css = $cssImportRules;

    // avoid including unneeded class dependency if there are no rules
    if ($this->matchingUninlinableCssRules !== []) {
        $cssConcatenator = new CssConcatenator();
        foreach ($this->matchingUninlinableCssRules as $cssRule) {
            $cssConcatenator->append([$cssRule['selector']], $cssRule['declarationsBlock'], $cssRule['media']);
        $css .= $cssConcatenator->getCss();

    // avoid adding empty style element
    if ($css !== '') {