前言介紹
- 這款 WordPress 外掛「Updates API Inspector」是 2020-08-05 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2020-08-06,距離現在已有 1737 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.6 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
內容簡介
WordPress 更新 API 對於許多開發者來說是一個謎,其中之一就是沒有相關文件。
對於在 WordPress 插件目錄 托管的外掛程式和在 WordPress 主題目錄 托管的佈景主題(還有核心本身),API 就可以正常運作。
對於外部托管的外掛程式和佈景主題(例如高級版的外掛程式/佈景主題),需要連接到 API 並確保在正確的站點快取中填充正確的資訊,以便核心為那些外部托管的外掛程式/佈景主題提供更新。這些站點快取是什麼:
update_plugins
update_themes
(當然,update_core 用於核心更新)。
這個外掛程式試圖通過允許你檢查以下的方式,使更新 API 更為清晰易懂:
核心查詢 API 的方式
API 回應查詢的內容
核心在為管理員用戶提供更新 (手動或自動更新) 時使用的站點快取的內容
目前,這個外掛程式非常基礎(畢竟它的版本號只有 0.1.1),但我會在現在的狀態下發佈它,因為有了 WordPress 5.5.0 的新的 自動更新 UI。儘管許多外部托管的外掛程式/佈景主題多年來一直連接到 API,但新的自動更新 UI 有特定的站點快取填充要求,並非所有外部托管的外掛程式/佈景主題都填充了這些要求,使得新 UI 可以正常運作(參見 建議使用更新 API 支援 WordPress 5.5 中外掛程式和佈景主題的自動更新 UI)。
我希望透過提供一種方便開發者檢查 API 查詢/回應以及核心填充它們的站點快取的方法,讓開發者更容易地更新他們的程式碼,以便新的 UI 可以正常運作。
在未來的版本中,我計劃添加很多其他功能,以及更廣泛的屏幕上的幫助「教育性質」。
原文外掛簡介
The WordPress Updates API is pretty much a mystery to many developers for many reasons, not least of which is the fact that there is no documentation for it.
For plugins hosted in the WordPress Plugin Directory and themes hosted in the WordPress Theme Directory (and core itself), the API “just works”.
Plugins and themes hosted externally (such as premium plugins/themes) need to hook into the API and ensure the proper information is populated in the proper site transients so that core can offer updates for those externally hosted plugins/themes. What site transients are those:
update_plugins
update_themes
(and of course, update_core for core updates).
This plugin attempts to demystify the Updates API by allowing you to inspect:
how the API is queried by core
what the API returns in respose to a query
what’s in the site transients core uses when offering updates to admin users (whether manual or auto-updates)
At this point, this plugin is very preliminary (it is version 0.1.1 after all), but I’m releasing it in it’s current state because of the new Auto-updates UI in WordPress 5.5.0. While many externally hosted plugins/themes have been hooking into API for years, the new auto-updates UI has certain requirements for how the site transients are populated and not all externally hosted plugins/themes have populated them such that the new UI will work properly (see Recommended usage of the Updates API to support the auto-updates UI for Plugins and Themes in WordPress 5.5).
My hope is that by providing an easy way for developers to inspect the API queries/responses and the site transients core populates from them, they will more easily be able to update their code so that the new UI works properly for them.
In future versions, I plan to add many other features, as well as more extensive on-screen help of an “educational” nature.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Updates API Inspector」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。