I have various javascripts that are necessary plugins in one of my WordPress domains, and I know where in the php file it\'s called from.
I\'m taking every measure I
Another solution using a different filter, which can be used to target a specific script handle:
function frontend_scripts()
{
wp_enqueue_script( 'my-unique-script-handle', 'path/to/my/script.js' );
}
add_action( 'wp_enqueue_scripts', 'frontend_script' );
function make_script_async( $tag, $handle, $src )
{
if ( 'my-unique-script-handle' != $handle ) {
return $tag;
}
return str_replace( '