內容簡介
有些外掛和佈景主題會取代 WordPress 預設的 jQuery 庫,改用其他版本的 jQuery,
通常是來自 Google AJAX CDN。這通常是不好的做法,因為其他許多外掛和佈景主題會依賴和預期 WordPress 預設的 jQuery 版本被載入。
此外,通常被載入的替代 jQuery 庫沒有使用 jQuery noConflict 模式執行,這可能會與其他 JavaScript 框架(如 Prototype 和 MooTools)產生衝突。
此外掛僅在 jQuery 已經在 WordPress 腳本佇列中時才將被載入的 jQuery 庫版本還原為預設版本。否則,此外掛不會執行任何操作。
外掛標籤
開發者團隊
原文外掛簡介
Some plugins and themes replace the default jQuery library that comes bundled with WordPress with another version,
typically from the Google AJAX CDN. This is generally bad practice, since many other plugins and themes rely on and
expect that the WordPress-bundled jQuery version is being loaded.
Also, typically the alternative jQuery library being loaded is not executed in the jQuery noConflict mode, which tend
to cause conflicts with other JavaScript frameworks, like Prototype and MooTools.
This plugin simply restores the version of jQuery being loaded to the one that comes bundled with WordPress. It only
does this if jQuery is already in the WordPress scripts queue, and won’t do anything otherwise.
