Automattic\WooCommerce\EmailEditorVendor\Sabberworm\CSS\CSSList

CSSList::insertBefore │ public │ WC 1.0

Inserts an item in the CSS list before its sibling. If the desired sibling cannot be found, the item is appended at the end.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$CSSList = new CSSList();
$CSSList->insertBefore( $item, $sibling );
$item(RuleSet|CSSList|Import|Charset) (обязательный)
.
$sibling(RuleSet|CSSList|Import|Charset) (обязательный)
.

Код CSSList::insertBefore() WC 11.3.0

public function insertBefore($item, $sibling)
{
    if (in_array($sibling, $this->aContents, true)) {
        $this->replace($sibling, [$item, $sibling]);
    } else {
        $this->append($item);
    }
}