Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
205 views
in Technique[技术] by (71.8m points)

Outdated Version of jQuery in Wordpress

I have a plugin in wordpress (easy-fancy-box), which I think is adding this in my wp header. <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js?ver=1.6.4'></script>

This version is outdated and is preventing me from using newer versions of jquery, (if i add version 1.8 of jquery, then the fancy box plugin fails. Is there a way to update the version which easy-fancy-box uses?

I have tried searching for this in all the plugin files, but cannot locate where it is on order to change it to the newer version

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Are you sure that it is not you or another plugin that is adding the jQuery?

I just had a look at the plugin you linked to, and it just calls the jQuery you registered to in WordPress.

Example line 402 in easy-fancybox.php:

wp_enqueue_script('jquery.fancybox', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.pack.js', __FILE__), array('jquery'), FANCYBOX_VERSION);

jQuery is loaded as a dependency in that.

Look in your theme if you deregistered jQuery (using wp_deregister_script('jquery') )and registered it again to use Google's CDN.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...