On `style_loader_tag`.

@since 170218.31677 Scripts/styles.

@param string|scalar $tag    HTML markup.
@param string|scalar $handle Style handle.

@return string Possible-modified HTML tag.
545604
public function onStyleLoaderTag($tag, $handle): string
    {
        $tag    = (string) $tag;
        $handle = (string) $handle;

        if (!($style = $this->didEnqueueStyle($handle))) {
            return $tag; // We did not enqueue this style.
        }
        if ($style['sri'] !== '' && !preg_match('/\sintegrity\s*\=/ui', $tag)) {
            if (($sri = $style['sri']) || ($sri = $this->c::sri($style['url']))) {
                $tag = str_replace(' rel=', ' integrity="'.esc_attr($sri).'" crossorigin="anonymous" rel=', $tag);
            } // NOTE: SRI may or may not be possible right now. Always check if `$sri` is non-empty.
            // NOTE: `c::sri()` also will not return an SRI for local resources on the current hostname.
        }
        return $tag; // Possibly modifed above.
    }
853978
private function load_handler_as_static($handler) {
	list($class, $method) = explode('::', $handler);
	
	$class::$method($this->url, $this->method, $this->arguments);
}
233364
protected function getStyleCodes(string $tag): array
	{
		if(isset($this->styles[$tag]))
		{
			return [$this->styles[$tag]];
		}
		elseif(isset($this->userStyles[$tag]))
		{
			$codes = [];

			foreach($this->userStyles[$tag] as $tag)
			{
				$codes = array_merge($codes, $this->getStyleCodes($tag));
			}

			return $codes;
		}

		throw new FormatterException(vsprintf('Undefined formatting tag [ %s ] detected.', [$tag]));
	}
1164862
private function replaceColor(string $text, string $tag, string $match, string $style): string
    {
        $replace = sprintf("\033[%sm%s\033[0m", $style, $match);
        return str_replace("<$tag>$match</$tag>", $replace, $text);
    }
298660
public function renderTag($tag)
    {
        $str = "<".$tag["tag"];
        foreach ($tag["options"] as $key=>$value) {
            $str.=" $key='$value'";
        }
        $str.=">".$tag["content"]."</".$tag["tag"].">";
        return $str;
    }
633468
function handleTag_br() {
    $this->out("  \n".$this->indent, true);
    $this->parser->html = ltrim($this->parser->html);
  }
843214
protected function openStyle(string $tag): string
	{
		$this->openTags[] = $tagName = $this->getTagName($tag);

		return $this->getSgrStyleSequence($tagName);
	}
1219443
public function getByHandle($handle)
    {
        return isset($this->converters[$handle]) ? $this->converters[$handle] : null;
    }
291314
public function clean_asset_tags($tag)
    {
        \preg_match_all(
            "!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!",
            $tag,
            $matches
        );
       
        if (empty($matches[2])) {
            return $tag;
        }

        $media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media="' . $matches[3][0] . '"' : '';

        return "\t".'<link rel="stylesheet" href="' . $matches[2][0] . '"' . $media . '>' . "\n";
    }
821799
public static function tagIncrementVer($tag)
        {
            if (!$tag) {
                return false;
            }

            $time = microtime(true) * 10000;

            if (is_array($tag)) {
                foreach ($tag as $tagName) {
                    self::GetInstance()->set("\$vxnTag:{$tagName}", $time, null, self::$ttlTags);
                    if (self::$useTagsBuffer) {
                        self::$tagsBuffer[$tagName] = $time;
                    }
                }

                return true;
            }
            else if (is_string($tag) || is_numeric($tag)) {
                self::GetInstance()->set("\$vxnTag:{$tag}", $time, null, self::$ttlTags);
                if (self::$useTagsBuffer) {
                    self::$tagsBuffer[$tag] = $time;
                }

                return $time;
            }

            throw new \TypeError("'\$tag' expected to be an array, string or numeric, got " . gettype($tag));
        }
1056103
public function getTag($tag)
    {
        return isset($this->tags[$tag]) ? $this->tags[$tag] : null;
    }
652067
public function defer_scripts($tag, $handle)
    {
        $excludes = Config::get('theme.defer_scripts_skip');

        // Get the script handles to exclude.
        if (empty($excludes)) {
            $exclude_list = [];
        } else {
            $exclude_list = $excludes;
        }

        // If the defer_scripts_skip option was not present, or was incompatible.
        if (! \is_array($exclude_list)) {
            $exclude_list = [];
        }

        if (\in_array($handle, $exclude_list)) {
            return $tag;
        }

        return \str_replace(' src', ' defer="defer" src', $tag);
    }
1272185
public static function tagGetVer(string $tag) :?int
        {
            if (!self::$useTagsBuffer || !($ver = (self::$tagsBuffer[$tag] ?? null))) {
                $ver = self::$tagsBuffer[$tag] = self::GetInstance()
                                                     ->get("\$vxnTag:{$tag}") ?: self::tagIncrementVer($tag);
            }

            return $ver ?: null;
        }
565804
public function disableStyleTag($styleset, $tag)
    {
        foreach ($styleset as $k => $v) {
            if (isset($this->stylestack[$k]) && $k == $tag) {
                unset($this->stylestack[$k]);
            }
        }
    }
1330351
public function Tag($tag, $instance, array $options = null)
    {
        //========================
        // Determine Handler
        //========================
        if(isset($options['cacheHandler'])) {
            if (isset($this->cacheHandlers[$options['cacheHandler']]))
            {
                $handler = $this->cacheHandlers[$options['cacheHandler']];
            } else {
                trigger_error("KeyRing Tag requested but that cache handler was not provided during construction of keyring", E_USER_ERROR);
            }
        } else {
            $handler = $this->cacheHandlers[$this->defaultCacheHandler];
        }
        
        //==================================
        // Check if Tag Version Specified
        //===================================
        $version = isset($options['version']) ? $options['version'] : null;                
        
        //==================================
        // Check if Prefix Specified
        //===================================
        $prefix = isset($options['prefix']) ? $options['prefix'] : $this->defaultPrefix;                
        
        // Determine Type
        if(isset($options['type'])) {
            switch(strtolower($options['type']))
            {
                case 'standard':                   
                    $tag = new FragmentedKeys\Tag\Standard($tag, $instance, $version, $handler, $prefix);
                    break;                
                case 'constant':
                    $tag = new FragmentedKeys\Tag\Constant($tag, $instance, $version, $handler, $prefix);
                    break;
            }
        }        
        return $tag;         
    }
1246724
public function label($handle = null)
    {
        if ($handle) {
            return $this->get($handle)->label;
        }

        return $this->setting->label;
    }
15463
protected function replaceColors($text, $tag, $match, ColorStyle $style)
    {
        $replace = $this->noColors
            ? $match
            : "\033[" . $style . "m" . $match . "\033[0m";

        return str_replace('<' . $tag . '>' . $match . '</' . $tag . '>', $replace, $text);
    }