I'm using a function to call the css library for font awesome, I'd like to include the integrity key to make sure the file is secure.
integrity="sha384-xxx" crossorigin="anonymous"
Would something like the following work?
function jsScripts() {
$integrity = 'integrity="sha384-xxx"';
$crossorigin = 'crossorigin="anonymous"';
wp_enqueue_script( 'fontawesome', 'https://use.fontawesome.com/releases/v5.5.0/css/all.css', $integrity, $crossorigin );
}
add_action('wp_enqueue_scripts','jsScripts');