WP Manifestindependent plugin directory
manifest / security / wp-resource-integrity

Resource Integrity and Cross Origin

Add integrity and crossorigin parameters to script and link resources when the values are set via wp_script_add_data or wp_style_add_data.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/kylereicks/wp-resource-integrity/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Add integrity and crossorigin attributes to WordPress resources

wp_script_add_data( 'script-handle', 'integrity', 'sha384-sDc5PYnGGjKkmKOlkzS+YesGwz4SwiEm6fhX1vbXuVxeS6sSooIz0V3E7y8Gk2CB' );
wp_script_add_data( 'script-handle', 'crossorigin', 'anonymous' );

wp_style_add_data( 'style-handle', 'integrity', 'sha384-5N3soZvYZ/q8LjWj8vDk5cHod041te75qnL+79nIM6NfuSK5ZJLu5CE6nRu6kefr' );
wp_style_add_data( 'style-handle', 'crossorigin', 'anonymous' );