I am using wordpress to add a cdn , this kind of thing works well with css with wp_styles . It seems to convert the link to the localhost link plus the cdn. My code echos:
It should echo
https:/cdnjs.cloudflare.com/ajax/libs/aos/2.2.0/aos.js?ver=1.1
Here is the problematic php code code:
function aos() {
wp_register_script( 'aos', 'https://cdnjs.cloudflare.com/ajax/libs/aos/2.2.0/aos.js', array('jquery'), 3.3, true);
wp_enqueue_script('aos');
}
add_action('wp_enqueue_scripts', 'aos');