Automattic\WooCommerce\EmailEditorVendor\Sabberworm\CSS\CSSList
CSSList::insertBefore
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() 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);
}
}