src/Widget/Injector/HtmlInjector.php
/**
     * insert some HTML into the head section of an HTML page.
     * If there is no Metatag anywhere, place it right before end of head.
     */
insert some HTML into the head section of an HTML page.
If there is no Metatag anywhere, place it right before end of head.
insert some HTML into the head section of an HTML page . If there is no Metatag anywhere place it right before end of head .
protected function metaTagsAfter(string $snippet, string $rawHtml): string
    {
        $result = self::injectAfterTagEnd($rawHtml, 'meta', $snippet);
        if ($result === $rawHtml) {
            $result = self::injectBeforeTagEnd($rawHtml, 'head', $snippet);
        }
        return $result;
    }
protected function metaTagsAfter ( string $ snippet , string $ rawHtml ) : string { $ result = self :: injectAfterTagEnd ( $ rawHtml , 'meta' , $ snippet ) ; if ( $ result === $ rawHtml ) { $ result = self :: injectBeforeTagEnd ( $ rawHtml , 'head' , $ snippet ) ; } return $ result ; }
insert some HTML into the head section of an HTML page.
insert some HTML into the head section of an HTML page .