WordPress at a glance
function is not described

Pelago\Emogrifier\Utilities

CssConcatenator::getOrCreateMediaRuleToAppendTo() private WC 1.0

{} It's a method of the class: CssConcatenator{}

No Hooks.

Return

\stdClass. Object with properties as described for elements of $mediaRules.

Usage

// private - for code of main (parent) class only
$result = $this->getOrCreateMediaRuleToAppendTo( $media );
$media(string) (required)
The media query for rules to be appended, e.g. "@media screen and (max-width:639px)", or an empty string if none.

Code of CssConcatenator::getOrCreateMediaRuleToAppendTo() WC 5.4.1

<?php
private function getOrCreateMediaRuleToAppendTo($media)
{
    $lastMediaRule = \end($this->mediaRules);
    if ($lastMediaRule !== false && $media === $lastMediaRule->media) {
        return $lastMediaRule;
    }

    $newMediaRule = (object)[
        'media' => $media,
        'ruleBlocks' => [],
    ];
    $this->mediaRules[] = $newMediaRule;
    return $newMediaRule;
}