Variable in wp_register_script doesn't work
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js');
jquery.js is loaded. However, as I’m using the URL elsewhere in my code, I’d like to load it this way, which doesn’t work:
$jquery_url = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js'; //jQuery URL ... wp_register_script( 'jquery', $jquery_url);
Am I missing something?
- The topic ‘Variable in wp_register_script doesn't work’ is closed to new replies.