通过 jQuery Migrate Helper 来解决升级 WordPress 5.5 带来的问题


wordpress 通过 jQuery Migrate Helper 来解决升级 Wordpress 5.5 带来的问题 wordpress

wordpress

每次Wordpress升级, 我都是第一时间点更新的, 因为很久之前, 曾经有一次很严重的Wordpress安全事件(虽然不是发生在我身上), 后台被黑, 原因就是Wordpress没有及时更新去修复一些安全隐患.

WordPress 5.5 更新最重要的就是图片 Lazy Load, 这可以使博客打开速度又快了一些, 因为图片只会在页面拉到当前视窗的时候才被加载.

wordpress-5.5 通过 jQuery Migrate Helper 来解决升级 Wordpress 5.5 带来的问题 wordpress

wordpress-5.5

装完之后, 立马就发现不对劲了, 经典编辑器Classic Editor只能使用全HTML模式. 图片无法上传(添加媒体), 还有就是b, i, 等编辑按钮都消失了. 原因是WP5.5 更新后, jquery-migrate没有开启, 所以很多插件和主题都不能用. 解决方法也很简单, 在官方修复这个问题之前, 我们可以安装 jQuery Migrate Helper 来修复.

装完之后, 在WP后台可以看到一些警告:

jQuery Migrate Helper — Warnings encountered
This page generated the following warnings:

https://helloacm.com/wp-content/plugins/gd-star-rating/js/rating/rating-editors.js:8:45): jQuery.browser is deprecated
Please make sure you are using the latest version of all of your plugins, and your theme. If you are, you may want to ask the developers of the code mentioned in the warnings for an update.

还有信息:

Right now you are using the Enable jQuery Migrate Helper plugin to enable support for old JavaScript code that uses deprecated functions in the jQuery JavaScript library. You will see warnings about these functions while using WordPress administration, but they will not be shown on the front-end of your site. To check if there are any warnings generated by your theme please look in the browser console.

If you get warnings, you should check the theme or plugin that generated them for an update. There will very likely be one you can install. When you have updated your plugins and themes, and there are no more warnings, please deactivate Enable jQuery Migrate Helper.

* A script, a file, or some other piece of code is deprecated when its developers are in the process of replacing it with more modern code or removing it entirely.

看来有新版本后先别着急在生产环境升级, 可以先在测试环境里升级跑跑看.

英文: Use jQuery Migrate Helper Plugin to Fix the Classic Editor Errors by WordPress 5.5 Update

GD Star Rating
loading...
本文一共 281 个汉字, 你数一下对不对.
通过 jQuery Migrate Helper 来解决升级 WordPress 5.5 带来的问题. (AMP 移动加速版本)
上一篇: 疫情期间到 Parkside 农场摘玉米草莓和西葫芦还有红蓝莓
下一篇: 计算前几项斐波那契数之和的算法

扫描二维码,分享本文到微信朋友圈
09ed05ad724aaed7a45aa83a2142569e 通过 jQuery Migrate Helper 来解决升级 Wordpress 5.5 带来的问题 wordpress

评论