WordPress中jQuery的过时版本 [英] Outdated Version of jQuery in Wordpress

查看:204
本文介绍了WordPress中jQuery的过时版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在wordpress(easy-fancy-box)中有一个插件,我认为是在wp标头中添加了一个插件. <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js?ver=1.6.4'></script>

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>

此版本已过时,正在阻止我使用jquery的较新版本,(如果我添加jquery的1.8版,则花哨的框插件将失败.是否有办法更新easy-fancy-box使用的版本?

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

推荐答案

您确定不是您自己或另一个添加jQuery的插件吗?

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

我只是查看了您链接到的插件,它只是调用了您在WordPress中注册的jQuery.

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

easy-fancybox.php中的示例行402:

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

jQuery被加载为依赖项.

jQuery is loaded as a dependency in that.

如果您注销了jQuery(使用wp_deregister_script('jquery'))并再次进行注册以使用Google的CDN,请查看您的主题.

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

这篇关于WordPress中jQuery的过时版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆