I\'m trying to use the wp_register_script and wp_enqueue_script FUNCTION on WordPress to enqueue a script, which has two attributes: \"integrity\" and \"crossorigin\".
N
Thanks for all the postings, they really helped. I did roll my own version to give it some structure and make it easier to read and update. Use enqueue as normal, use script for CSS files with a false tag at the end so that it loads at the top. Though it can probably be simplified somewhat.
add_filter('script_loader_tag', 'add_attributes_to_script', 10, 3);
function add_attributes_to_script( $tag, $handle, $src ) {
$scripts_to_load = array (
(0) => Array
(
('name') => 'popper_min_js',
('type') => '