[WordPress] 外掛分享: Use Google Libraries

前言介紹

  • 這款 WordPress 外掛「Use Google Libraries」是 2008-11-24 上架。
  • 目前有 10000 個安裝啟用數。
  • 上一次更新是 2017-11-28,距離現在已有 2714 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.4 以上版本才可以安裝。
  • 有 47 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

jczorkmid |

外掛標籤

cdn | google | jquery | javascript | performance |

內容簡介

e's content distribution network (CDN) URLs for the supported libraries.
This hook is used to replace the default WordPress registered script sources with the CDN URL.
print_scripts_array

Once the scripts have been registered with the replacement CDN URLs, this hook prints the script tags in the HTML head section.
This plugin supports protocol-relative URLs where possible, meaning it will take the URL protocol (either http or https) from the current page, ensuring the library is loaded over a secure connection where required.

This plugin supports the following libraries and components: Dojo, jQuery, jQuery UI, MooTools, Prototype, script.aculo.us, and swfobject.

However, it may be incompatible with certain plugins or themes, such as Better WordPress Minify (version 1.2.2), Gravity Forms, and WP-Minify, as well as the K2 theme. If you encounter any issues, please let the plugin developer know.

Links to the plugin's homepage, issue tracker, and support forum, as well as a request for users to provide feedback before marking it as "broken" in the WordPress Plugin Directory, are also included.

原文外掛簡介

A number of the javascript libraries distributed with WordPress are also
hosted on Google’s AJAX Libraries API.
This plugin allows your WordPress site to use the content distribution
network side of Google’s AJAX Library API, rather than serving these files from your WordPress install directly.
This provides numerous potential performance benefits:

increases the chance that a user already has these files cached
takes load off your server
uses compressed versions of the libraries (where available)
Google’s servers are set up to negotiate HTTP compression with the requesting browser

For a more detailed look see Dave Ward’s 3 reasons why you should let
Google host jQuery for
you.
Supported Libraries and Components

Dojo
jQuery
jQuery UI
MooTools
Prototype
script.aculo.us
swfobject

Links

Use Google Libraries Home
Issue Tracker
GitHub Repository
Support Forum

Incompatible Plugins
Better WordPress Minify
Better WordPress Minify version 1.2.2 does not yet support
protocol-relative URLs, but the next release is supposed to correct
this.
Gravity Forms
I’ve had reports of Gravity Forms breaking UGL, but I don’t have
access to Gravity Forms, so I’m not sure what’s going on. If you need
Gravity Forms you might need to disable UGL, or it might be fine, I’m
not really sure.
WP-Minify
WP-Minify doesn’t yet support protocol-relative URLs. Add
‘//ajax.googleapis.com/’ as a JS and CSS exclusion.
Incompatible Themes
K2
I’ve had scattered reports that UGL is stepping out of the way when
using K2.
A Request
If you’re going to flag the plugin as “broken” in the WordPress Plugin
Directory, please try and let me know what is
broken.
I’m not a mind reader.
Technical Details
Use Google Libraries uses the following hooks (each with a priority of 1000).
wp_default_scripts
Use Google Libraries compares it’s list of supported scripts to those
registered, and replaces the standard registrations src with ones that
point to Google’s servers. Other attributes (like dependencies) are left
intact.
script_loader_src
Use Google Libraries removes the ver=x.y.z query string from the URL
used to load the requested library if it is going to load the library from
ajax.googleapis.com. Otherwise the URL is left unaltered. This both
improves the chances of the given URL already being cached, and prevents
script.aculo.us from including scripts multiple times.
If jQuery is enqued Use Google Libraries will inject a bit of
javascript before the next enqueued script enabling jQuery’s noConflict mode as it would
with the standard WordPress version.
References
Parts of this plugin (specificly, the dropping of the micro number,
which has since been removed for better caching performance) were
inspired by John Blackbourn’s
Google AJAX Libraries,
which has very similar goals to this plugin.
Future Plans

add ability to disable protocol relative URLs
add ability to disable on frontend and/or admin

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Use Google Libraries」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 1.2 | 1.5 | 1.6 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.9 | 1.1.2 | 1.2.1 | 1.5.1 | 1.5.2 | 1.5b1 | 1.6.1 | 1.6.2 | 1.0.6.1 | 1.0.7.1 | 1.0.9.1 | 1.0.9.2 | 1.1.0.1 | 1.6.2.1 | 1.6.2.2 |

延伸相關外掛(你可能也想知道)

  • Site Kit by Google – Analytics, Search Console, AdSense, Speed 》Site Kit是Google官方的WordPress外掛程式,提供有關人們如何尋找和使用您的網站的洞察。Site Kit是一站式解決方案,可部署、管理並獲取關鍵Google工具的見解...。
  • Google for WooCommerce 》, Google Listings & Ads可讓您輕鬆地向Google平台上的購物者展示您的產品。無論您是數位廣告的新手還是市場營銷專家,您都可以通過免費和廣告來擴大您的...。
  • GTM4WP – A Google Tag Manager (GTM) plugin for WordPress 》Google Tag Manager (GTM) 是 Google 免費工具,讓每個人都能使用直覺的網頁 UI 管理並部署分析和行銷標籤,以及其他程式碼片段。欲瞭解更多此工具信息,請前...。
  • Widgets for Google Reviews 》onal version of our review software, you can:, , , Display unlimited Google Reviews, Customize widget design and behavior, Respond to reviews direc...。
  • GA Google Analytics – Connect Google Analytics to WordPress 》t connects your WordPress website to Google Analytics. It supports Universal Analytics (analytics.js), Global Site Tag (gtag.js), and Google Analyt...。
  • OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy. 》, 使用 Google 的字型服務,怎麼可能與 GDPR 不符呢?事實上,當使用者的瀏覽器要求字型時,他們的 IP 會被 Google 記錄並用於分析。, — Lifehacker, , OMG...。
  • Nextend Social Login and Register 》ge and registration form, link the social accounts to the existing WordPress user accounts or create new users if necessary, enable users to link t...。
  • Plugin for Google Reviews 》iews plugins:, , Facebook Reviews Bundle - display Facebook business reviews on your website using official Facebook API, Yelp Reviews Bundle - dis...。
  • Local Google Fonts 》將使用的 Google 字體儲存在您的伺服器上,讓您的網站更符合 GDPR 條例 💯。, 約有 5,000 萬*個網站使用 Google Fonts,而在 2022 年一家德國法院裁定使...。
  • Web Stories 》Web Stories 是一種免費、開放網絡的視覺故事格式,讓您能夠輕鬆地創建具有引人入勝的動畫和可點擊互動的視覺敘事,並讓讀者沉浸在優美且快速加載的全屏體驗...。
  • AI Powered Marketing 》k a Google Merchant Center Account, With Kliken, you can easily create or link a Google Merchant Center Account and optimize your product feeds wit...。
  • Simple Google reCAPTCHA 》Simple Google reCAPTCHA將保護您的WordPress!您可以在默認的v2復選框和v3(如隱形reCAPTCHA)之間進行選擇。, 不再有垃圾評論和針對用戶帳戶的暴力攻擊。小...。
  • Login No Captcha reCAPTCHA 》此外掛新增了 Google 無人類驗證功能的勾選框,可應用於您的 WordPress 和 Woocommerce 登錄、忘記密碼及使用者註冊頁面,讓人類使用者輕鬆透過勾選框登入,...。
  • Analyticator 》檢查最新的 WordPress 優惠,適用於您的網站。, Google Analyticator 讓您輕鬆在 WordPress 儀表板中查看 Google Analytics 數據。這樣就不需要編輯您的佈景...。
  • Simple Calendar – Google Calendar Plugin 》Simple Calendar 是將 Google 日曆事件添加到 WordPress 網站上最簡單的方法。快速設置。細調到您的需求。適用於手機的響應式設計。, Simple Calendar 功能, ...。

文章
Filter
Apply Filters
Mastodon