On `script_loader_tag`.

@since 170218.31677 Scripts/styles.

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

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

        if (!($script = $this->didEnqueueScript($handle))) {
            return $tag; // We did not enqueue.
        }
        if ($script['async'] && !preg_match('/\s(?:async|defer)[=\s>]/ui', $tag)) {
            $tag = str_replace(' src=', ' async src=', $tag);
        } elseif ($script['defer'] && !preg_match('/\s(?:async|defer)[=\s>]/ui', $tag)) {
            $tag = str_replace(' src=', ' defer src=', $tag);
        }
        if ($script['sri'] !== '' && !preg_match('/\sintegrity\s*\=/ui', $tag)) {
            if (($sri = $script['sri']) || ($sri = $this->c::sri($script['url']))) {
                $tag = str_replace(' src=', ' integrity="'.esc_attr($sri).'" crossorigin="anonymous" src=', $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.
    }
1192014
public function _processTags(&$tags)
    {
        $tagString = '';
        foreach ($tags as $key => $tag) {
            if ($key != '@text') {
                if (is_array($tag)) {
                    $hasText = FALSE;
                    foreach ($tag as $key => $tagFromGroup) {
                        if ($tagFromGroup->text($this->_doclet) != '') {
                            $hasText = TRUE;
                        }
                    }
                    if ($hasText) {
                        $tagString .= '<dt>'.$tag[0]->displayName().":</dt>\n";
                        foreach ($tag as $tagFromGroup) {
                            $tagString .= '<dd>'.$tagFromGroup->text($this->_doclet)."</dd>\n";
                        }
                    }
                } else {
                    $text = $tag->text($this->_doclet);
                    if ($text != '') {
                        $tagString .= '<dt>'.$tag->displayName().":</dt>\n";
                        $tagString .= '<dd>'.$text."</dd>\n";
                    } elseif ($tag->displayEmpty()) {
                        $tagString .= '<dt>'.$tag->displayName().".</dt>\n";
                    }
                }
            }
        }
        if ($tagString) {
            echo "<dl>\n", $tagString, "</dl>\n";
        }
    }
920628
public function tagSwitch($tag, $content)
    {
        $name     = !empty($tag['expression']) ? $tag['expression'] : $tag['name'];
        $name     = $this->autoBuildVar($name);
        $parseStr = '<?php switch(' . $name . '): ?>' . $content . '<?php endswitch; ?>';

        return $parseStr;
    }
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;         
    }
834856
private function renderTag($tag, $content = null, array $attributes = [])
    {
        $attr = [];

        foreach ($attributes as $key => $value) {
            $attr[] = sprintf(' %s="%s"', $key, $value);
        }

        if (0 < strlen($content)) {
            return sprintf('<%s%s>%s</%s>', $tag, implode('', $attr), $content, $tag);
        } else {
            return sprintf('<%s%s />', $tag, implode('', $attr));
        }
    }
1326632
static function get_action_tag_static( $tag, $slug = '', $is_plugin = true ) {
            $action = "fs_{$tag}";

            if ( ! empty( $slug ) ) {
                $action .= '_' . self::get_module_unique_affix( $slug, $is_plugin );
            }

            return $action;
        }
126996
public function render(RenderHandler $handler)
    {
        foreach ($this->comments as $comment) {
            $handler->add(self::DIRECTIVE_COMMENT, $comment);
        }
        return true;
    }
999621
public function css($handle = null, $src = null, $dependency = null, array $attributes = [])
    {
        if ($handle === null) {
            $handle = $this->getName();
        }

        // Set default media attribute
        if (!isset($attributes['media'])) {
            $attributes['media'] = 'all';
        }

        return $this->put($handle.'.css', new Css($handle, $src, $dependency, $attributes));
    }
943580
public function render(RenderHandler $handler)
    {
        sort($this->sitemaps);
        foreach ($this->sitemaps as $sitemap) {
            $handler->add(self::DIRECTIVE_SITEMAP, $sitemap);
        }
        return true;
    }
921053
public function addStyle($handle, $src = null, $deps = array(), $ver = false, $media = false)
	{
		$args = func_get_args();
		array_shift($args);
		return $this->add($handle, 'style', $args);
	}
66184
public function checkTag(Tag $tag)
	{
		if (isset($tag->template) && !($tag->template instanceof UnsafeTemplate))
		{
			$template = (string) $tag->template;
			$this->checkTemplate($template, $tag);
		}
	}
754201
protected function preRenderLocalized(RequireTagInterface $tag)
    {
        $output = '';

        foreach ($this->getLocalizedAssets($tag->getPath()) as $localeAsset) {
            $output .= $this->doRender($tag, $localeAsset);
        }

        return $output;
    }
298660
public function renderTag($tag)
    {
        $str = "<".$tag["tag"];
        foreach ($tag["options"] as $key=>$value) {
            $str.=" $key='$value'";
        }
        $str.=">".$tag["content"]."</".$tag["tag"].">";
        return $str;
    }
1246724
public function label($handle = null)
    {
        if ($handle) {
            return $this->get($handle)->label;
        }

        return $this->setting->label;
    }
60839
private function retrieve_tag($tag)
    {
        if (isset($this->tags[$tag . 'count'])) { //if the openener is not in the Object we ignore it
            $temp_parent = $this->tags['parent']; //check to see if it's a closable tag.
            while ($temp_parent) { //till we reach '' (the initial value);
                if ($tag . $this->tags[$tag . 'count'] === $temp_parent) { //if this is it use it
                    break;
                }
                $temp_parent = isset($this->tags[$temp_parent . 'parent']) ? $this->tags[$temp_parent . 'parent'] : ''; //otherwise keep on climbing up the DOM Tree
            }
            if ($temp_parent) { //if we caught something
                $this->indent_level = $this->tags[$tag . $this->tags[$tag . 'count']]; //set the indent_level accordingly
                $this->tags['parent'] = $this->tags[$temp_parent . 'parent']; //and set the current parent
            }
            unset($this->tags[$tag . $this->tags[$tag . 'count'] . 'parent']); //delete the closed tags parent reference...
            unset($this->tags[$tag . $this->tags[$tag . 'count']]); //...and the tag itself
            if ($this->tags[$tag . 'count'] === 1) {
                unset($this->tags[$tag . 'count']);
            } else {
                $this->tags[$tag . 'count']--;
            }
        }
    }
572264
public function loadStyle($handle, $url, array $deps = [], $media = 'all')
    {
        wp_register_style($handle, $url, $deps, $this->version, $media);
        wp_enqueue_style($handle);
    }
1339579
public function render(RenderHandler $handler)
    {
        if (!empty($this->version)) {
            $handler->add(self::DIRECTIVE_ROBOT_VERSION, $this->version);
        }
        return true;
    }