Adding nonce or hashes to inline scripts

In case you need to add SRI to script file resources, this great approach should do the trick. https://joshuatz.com/posts/2020/adding-extra-attributes-to-style-and-script-tags-in-wordpress/ It provides a tool to add any attribute to script and style elements added by wp_enqueue_, and has a good example there, with exactly this thought in mind. One caveat is it works for scripts in … Read more