[WordPress] 外掛分享: Kunze Law

首頁外掛目錄 › Kunze Law
WordPress 外掛 Kunze Law 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
700+
安裝啟用
尚無評分
344 天前
最後更新
問題解決
WordPress 6.0+ v2.1 上架:2017-05-21

內容簡介

使用 Kunze Law 外掛程式,透過簡短代碼匯入來自中央遠端地址的內容(HTML 片段)到文章或頁面中。這個功能相當有益,尤其當你需要為數個 WordPress 網站提供內容並進行定期更新。該外掛會將遠端內容快取至本機端,並在預先設定的時間內設定 (可在外掛中進行設定) 將片段撈回。其中一個重要優點是,為了讓所有網站都進行更新,你只需要在遠端伺服器上編輯片段。

舉例來說,假設你正在使用這個外掛程式與 HTML 片段在數百個網站上使用。在內容有所更改時,你只需要在遠端伺服器上編輯片段,當快取時間過期,新內容將會從遠端伺服器上撈回。無需在每個網站上手動進行操作。

如何開始使用呢?

1. 設定遠端伺服器。選擇你的遠端伺服器網址。

2. 如果你希望在遠端訪問出現問題時收到電子郵件,請啟用「獲取電子郵件錯誤訊息核取方塊」,並提供有效的「電子郵件錯誤來源地址」值。

3. 創建 HTML 片段。片段是 HTML 檔案。片段的內容將被交付。請使用檔名.html 作為檔名,「檔名」可以自由替換。

4. 上傳片段至遠端伺服器。

5. 安裝這個外掛程式平,並填寫以下資訊:

- 遠端伺服器,例如 http://yourserver.com/content

- 快取時間(秒)。這是外掛程式在幾秒鐘後會在遠端伺服器上檢查更新內容的時間。

6. 為了獲取名為 facebook.html 片段的內容,必須使用 [kunze_facebook] 作為簡代碼。

7. 在 WordPress 中嵌入這個簡短代碼。這適用於頁面、文章和小工具。

命名規則:

在 WordPress 中的簡短代碼: [kunze_filename]

遠端伺服器上的 HTML 片段: filename.html

範例 HTML 片段:

`<div class="myClass"><strong>lorem ipsum</strong></div>```

Kunze Law..

- 如果遠端伺服器出現問題,錯誤訊息可發送至 WordPress 管理電子郵件地址 (設置 > 一般 > 電子郵件地址)。該電子郵件只會發送一次。

- 會在本地端快取 HTML 片段。若遠端伺服器無法正常運作,則會使用本地端快取片段。

- 可在 WordPress 多站點安裝中運作。

- 基於常規表達式。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Kunze Law」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Use the Kunze Law Plug-In to import content (HTML snippets) from a central remote Address into a post or page using a shortcode. This is very beneficial in case you deliver content for several
WordPress installations which needs a periodical update. The Plug-In will cache the remote content locally. After a predefined time, which can be set within the Plug-In, the snippet will be
pulled again. The big advantage: In order to get all websites updated, you only have to edit the snippet on the remote server.
Example:
Imagine you are using the Plugin and a HTML snippet in hundreds of your websites. In case of content changes you only have to edit the snippet on the remote server. After expiry of the set cache time the new
content will be pulled from the remote server. No need to do this manually on every website.
How to start:

Set up the remote server. Choose the url of your remote server.
If you would like to receive an E-Mail in case of remote access problems, please activate the “Get E-Mail Error Message checkbox”. Please provide a valid “E-Mail Error From Address” value.
Create HTML snippets. A snippet is a html file. The content of the snippet will be delivered. Always use filename.html as the file name. “filename” can be replaced to your need.
Upload the snippets onto the remote server.
Install the Plugin and fill in the following information:

Remote Server. e.g. http://yourserver.com/content
Cache time in seconds. This is the time in seconds after the plugin will look for updated content on the remote server.

In order to get the content of a snippet named facebook.html, you have to use [kunze_facebook] as the shortcode.
Embed the shortcode within WordPress. This works in pages, posts and widgets.

Naming convention:
Shortcode within WordPress: [kunze_filename]
HTML Snippet on remote Server: filename.html
Example of a HTML snippet:
`

lorem ipsum

```

The Kunze Law..

in case of problems with the remote server, a message can be send to the WordPress administration email address. (Settings > General > E-Mail Address). The email is send only once.
will cache locally your HTML snippets. If the remote server does not work any longer – the local saved snippets will be served.
works within a WordPress Multisite installation
is based on regular expressions

延伸相關外掛

文章
Filter
Mastodon