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";
    }