Support » Fixing WordPress » Load jQuery from CDN but not in admin panel

  • Hi, I use this code to have jQuery loaded directly from its original CDN:

    // load jQuery directly from its original CDN
    add_filter('script_loader_src', 'my_script_loader_src', 10, 2);
    function my_script_loader_src($src, $handle)
    {
    	if ($handle == "jquery")
    		return "http://code.jquery.com/jquery-latest.min.js";
    
    	return $src;
    }

    Anyway it causes trouble with the drag ‘n drop feature for the menu.

    How can I modify my code to “fix” this problem with the drag ‘n drop ?

    Thanks in advance! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Load jQuery from CDN but not in admin panel’ is closed to new replies.