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
Very little modification code Mike Kormendy, which allows you to add 2 attributes at once:
// Async load
function add_asyncdefer_attribute($tag, $handle)
{
$param = '';
if ( strpos($handle, 'async') !== false ) $param = 'async ';
if ( strpos($handle, 'defer') !== false ) $param .= 'defer ';
if ( $param )
return str_replace('
Result: