public static function addToHTML()
    {
        if (!self::isViewingHTMLPage()) {
            return;
        }

        // js
        $paths = self::getAssetFilePaths('js');
        echo sprintf(
            '<script>%s</script>',
            self::getCombinedContents($paths)
        );

        // css
        $paths = self::getAssetFilePaths('css');
        echo sprintf(
            '<style>%s</style>',
            self::getCombinedContents($paths)
        );
    }
public static function addToHTML()
    {
        if (!self::isViewingHTMLPage()) {
            return;
        }

        // js
        $paths = self::getAssetFilePaths('js');
        echo sprintf(
            '<script>%s</script>',
            self::getCombinedContents($paths)
        );

        // css
        $paths = self::getAssetFilePaths('css');
        echo sprintf(
            '<style>%s</style>',
            self::getCombinedContents($paths)
        );
    }
public static function addToHTML ( ) { if ( ! self :: isViewingHTMLPage ( ) ) { return ; } // js $ paths = self :: getAssetFilePaths ( 'js' ) ; echo sprintf ( '<script>%s</script>' , self :: getCombinedContents ( $ paths ) ) ; // css $ paths = self :: getAssetFilePaths ( 'css' ) ; echo sprintf ( '<style>%s</style>' , self :: getCombinedContents ( $ paths ) ) ; }
Add HTML to the page for frontend code
This is probably not the right way to do it
but it avoids us needing to reference files from vendor over HTTP requests.
Add HTML to the page for frontend code This is probably not the right way to do it but it avoids us needing to reference files from vendor over HTTP requests .