我正在将Font Awesome 4升级到版本5,该版本在<link rel="stylesheet"> 加成
目前,我正在使用:
wp_register_style(\'FontAwesome\', \'https://example.com/font-awesome.min.css\', array(), null, \'all\' );
wp_enqueue_style(\'FontAwesome\');
输出为:
<link rel="stylesheet" id="FontAwesome-css" href="https://example.com/font-awesome.min.css" type="text/css" media="all" />
通过Font Aweome 5,它引入了两个新的属性和值(
integrity 和
crossorigin) e、 g:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
因此,我需要找出如何将完整性和交叉源添加到wp\\u register\\u样式中,我已经尝试使用
wp_style_add_data 如果失败,则此方法似乎只支持
conditional,
rtl 和
suffix,
alt 和
title.