[WordPress] 外掛分享: Remote API

前言介紹

  • 這款 WordPress 外掛「Remote API」是 2011-01-31 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2011-02-23,距離現在已有 5184 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

tott | automattic |

外掛標籤

api | remote API | lazy widget | Lazy Loading | remote access |

內容簡介

這個外掛的基本使用情境是對內容區塊進行延遲載入或是跨部落格操作。
它包含一個簡單的延遲載入小工具範例,但主要是針對開發人員,希望在此功能上進行擴充。
功能:

網址格式的表現形式為 http://////,以允許伺服器端儲存未設置大量重寫規則的要求快取。請求字串包含了所有要求的參數。
不同的響應格式。在 response.php 中捆綁了 XML 和 JSON,可以擴展為所需的格式。
整個類別中都使用自訂例外處理器的異常,以允許在要求的回應格式中提供錯誤回饋。

請查閱從 remote-api.php 開始的內部文件說明,以了解使用情境,也可以參考範例。
延遲載入小工具範例

延遲載入小工具範例是此程式的基本使用情境。它的 UI 還不是很完善,但應該能夠讓你對這個遠端 API 可以做什麼有個印象。

當你到 /wp-admin/widgets.php 中訪問小工具管理頁面時,你會注意到一個名為 "Remote_API_Lazy_Widget" 的小工具。把它拖到你希望有一些以異步方式載入的小工具出現的其中一個側邊欄中,並給它一個標題。然後重新載入 widgets.php 頁面。

一個新的側邊欄應該會出現,你可以在其中放置其他小工具。你下放到這個側邊欄的小工具將會通過 AJAX 請求以立即載入的方式出現在佔位小工具的位置上。

原文外掛簡介

A basic use case for this plugin would be lazy loading content segments or performing cross-blog actions.
It includes a simple example for lazy loading widgets, but is mainly aimed for developers who like to built on top of this functionality.
Features:

Url Format in form of http:////// in order to allow server side caching of requests without setting up a huge set of rewrite rules. The request string contains all request parameters
Variable response formats. Comes with xml and json bundled in response.php but can be extended to your needs
Exceptions with custom exception handler are used throughout the classes to allow error feedback in the requested response format.

Please have a look at the inline documentation starting from remote-api.php. To get a sense of the usage have a look at the examples
Lazy Loading Widget Example
The Lazy Loading Widget example is a basic use case for this script. It’s UI is still not very tuned, but should give an impression on what can be done with this remote-api.
When you visit your widget administration at /wp-admin/widgets.php you’ll notice a widget called “Remote_API_Lazy_Widget”. Drag it to one of your sidebars where you would like to have some asynchronously loaded widget appear and give it a Title. Then reload the widgets.php page.
A new sidebar should appear in which you can drop other widgets. The widgets you’ll drop in this sidebar will be loaded asynchronously via a ajax request in place of the placeholder widget.

各版本下載點

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

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


最新版本

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

  • LazyLoad Plugin – Lazy Load Images, Videos, and Iframes 》LazyLoad 是最好的 WordPress 免費 Image Lazy Load 外掛程式,可以在 WordPress 上延遲載入圖片、影片和 iframes。簡單來說,LazyLoad 會在圖片、影片和 ifr...。
  • BJ Lazy Load 》延遲載入可使您的網站加載速度更快,並節省頻寬。, 此外掛可取代您所有的文章圖片、文章縮略圖、大頭貼圖片和內容的 iframe,並使用佔位圖片,當訪客滾動頁面...。
  • Lazy Loader 》這款懶加載外掛支援圖片、iFrame、影片和音訊元素,使用輕量級的 lazysizes 腳本。手動修改標記也可以實現懶加載背景圖片、腳本和樣式。, 以下元素會自動懶加...。
  • Lazy Load Optimizer 》這是一款懶加載圖片和 iframe 的外掛程式,可加速網站的頁面加載速度,並支援 WooCommerce。, 這個外掛程式使用lazysizes。這是目前最受歡迎、性能最佳且符合...。
  • Camera slideshow 》如果你正在尋找一個先進的 WordPress 幻燈片: Shortcodelic plugin bundle (它還包括許多其他功能:選項卡,手風琴,Google 地圖,價格表,頁面組合器……)...。
  • Speed Up – Lazy Load 》這個外掛實作了「慵懶載入」技術,僅當使用者滾動到網頁中需要顯示圖片或 iframe 時,才會開始下載它們,從而提升頁面載入速度和節省頻寬,且避免下載那些不...。
  • Disable Lazy Load 》這個簡單的外掛可以在網站上禁用懶載入功能,或只針對特定圖像禁用。, 設置, 啟用外掛後,到控制面板->設置->媒體,然後在懶載入設置下,您將找到以下...。
  • WPSocialite 》沒有人喜歡長時間的載入時間,但我們都希望能夠透過 Facebook、Twitter 和其他社交網路分享我們的內容。這些社交網路卻需要很長的載入時間。矛盾?不再!使用...。
  • Lazy Loading Feature Plugin 》「懶加載功能外掛」是由 WordPress 團隊維護的官方外掛,旨在測試自動將 loading HTML 屬性新增至支援其的圖片和其他元素。, 有關 loading 屬性的更多資訊:,...。
  • Smart Image Loader 》Smart Image Loader 只會載入在網站初始視窗中可見的圖片,在任何位置 “Below the Fold”(超出目前視窗範圍)的圖片之前。這些圖片可以在可見圖...。
  • Piio – Make your Images Load Faster, Optimize Your Website & Boost Your SEO 》tructions below to install Piio:, , Upload the entire piio folder to the /wp-content/plugins/ directory., Activate the plugin through the 'Plugins'...。
  • Infinite Scroll Random Post 》ISRP (Infinite Scroll Random Post) 是一個 WordPress 外掛,, 該外掛可以實現文章頁面的 AJAX 連接(無限滾動)。, 當用戶滑動到文章底部時,下一篇文章就...。
  • Dominant Colors Lazy Loading 》這個外掛允許您在執行圖片懶加載時,將每個圖片的主要顏色作為預留區塊顯示,就像 Pinterest 或 Google Images。它還允許您使用微小縮略圖作為占位符。如果您...。
  • Lazy Optimization 》懶惰優化外掛是首個能夠懶加載外部 CSS 檔案中的背景圖像的 WordPress 外掛。, 懶惰優化外掛是在 Autoptimize 外掛的基礎上運作,用於懶加載 Autoptimize 外...。
  • Disable Default Lazy Loading 》安裝、啟用,就完成了。, 如果你想要停用 WordPress 的預設延遲載入功能,只需要安裝並啟用這個外掛。不需要額外的設定。, 有時候你可能想要停用 WordPress ...。

文章
Filter
Apply Filters
Mastodon