WP Manifestindependent plugin directory
manifest / performance / wp-script-async-defer

Script async and defer.

Add async and defer parameters to script tags when the values are set via wp_script_add_data.

★ 0stars

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-script-async-defer/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 async and defer attributes to WordPress scripts

wp_script_add_data( 'script-handle', 'async', true );
wp_script_add_data( 'script-handle', 'defer', true );