skip to Main Content

How to add attribute to the script in php – WordPress

I have a link to the script in my HTML <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCrAbBwliakQCs7vDgLGilKQnicEc0-8hA&callback=initMap&v=weekly" defer></script> I need to add attribute "defer" in my php when using "wp_dequeue_style" wp_enqueue_script('google-map', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCrAbBwliakQCs7vDgLGilKQnicEc0-8hA&callback=initMap&v=weekly', [], $version, true); is it any options?

VIEW QUESTION
Back To Top
Search