[WordPress] 外掛分享: GNU Terry Pratchett

首頁外掛目錄 › GNU Terry Pratchett
1,000+
安裝啟用
★★★★★
5/5 分(13 則評價)
106 天前
最後更新
問題解決
WordPress 4.6+ PHP 5.6+ v0.4.1 上架:2015-03-14

內容簡介

GNU Terry Pratchett 外掛會發送一個名為 "X-Clacks-Overhead" 的 HTTP 標頭,標頭內容為 "GNU Terry Pratchett",這樣 Terry 的名字就能在網路世界 "overhead" 轉傳世世代代。

在 Pratchett 的 "Going Postal" 中,為了致敬在職場上殉職的人,他們的名字會被傳送到整個 Discworld 電報系統中。

這個外掛讓 WordPress 的使用者可以沒有必要修改他們的伺服器設定,輕鬆地致敬 Terry Pratchett。

GNU Terry Pratchett 標頭

這個外掛有兩種方式加入 GNU Terry Pratchett 標頭:

作為 HTTP 標頭(如果您未使用 WordPress 頁面快取外掛)。
作為 HTML 的 meta 標籤,具有 http-equiv 屬性。

設定

如果您沒有更改默認的 "X-Clacks-Overhead header" 欄位,HTTP 標頭和 meta 標籤所傳送的文字默認為「GNU Terry Pratchett」。

如果您要更改它,請訪問 WordPress 管理區中的設置->GNU Terry Pratchett,編輯 "X-Clacks-Overhead header" 欄位。

這項選項允許您通過使他人永遠成為您網站內容的一部分,來紀念其他人。

檢查是否已發送 HTTP 標頭

有幾種方法可以檢查您的網站是否顯示 HTTP 標頭:

使用終端機 (curl -I example.com )。
使用Chrome的網路選項卡。
使用 Chrome 插件 Clacks Overhead 或 Firefox 擴展 GNU Terry Pratchett 。
使用 Server Header Checker 。

請注意,如果您使用頁面緩存外掛程式,則不會發送 HTTP 標頭。 要發送 HTTP 標頭並繼續使用快取外掛,請在伺服器層面上添加標頭,有關選項請參閱 http://www.gnuterrypratchett.com/。

檢查是否添加了 meta 標籤

您可以通過查看網站的 HTML 源代碼,並搜索 "GNU Terry Pratchett",來檢查 meta 標籤是否可見。

Chrome 的 Clacks Overhead 外掛和 Firefox 的 GNU Terry Pratchett 擴展在檢測到 HTML meta 標籤或 HTTP 標頭時會亮起。

鳴謝和貢獻

受reddit文章、boingboing報導以及GNU Terry Pratchett網站啟發。

歡迎在 GitHub 存儲庫 上作出貢獻。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4.1) 或搜尋安裝

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

原文外掛簡介

The GNU Terry Pratchett plugin transmits an “X-Clacks-Overhead” header reading, “GNU Terry Pratchett” so that Terry’s name is whispered forevermore in the Internet’s “overhead”.
In Pratchett’s “Going Postal”, workers who die in the line of duty have their names transmitted up and down the Discworld’s telegraph system as a tribute.
This plugin makes it easy for WordPress users to do the same for Terry Pratchett, without having to modify their server configuration.
The GNU Terry Pratchett headers
The plugin adds the GNU Terry Pratchett header in two ways:

As an HTTP header (if you don’t use a WordPress page caching plugin).
As a meta tag in your HTML with the http-equiv attribute.

Settings
The text sent in HTTP headers and meta tags is “GNU Terry Pratchett” by default.
Change this by visiting Settings → GNU Terry Pratchett in your WordPress admin area and editing the “X-Clacks-Overhead header” field.
This option lets you honor other people you would like to remember by making them a small part of your site’s content forever.
Checking the HTTP header is sent
There are several ways to check that the HTTP header is appearing for your site:

With your terminal (curl -I example.com)
With Chrome’s Network tab.
With the Clacks Overhead Chrome plugin or the GNU Terry Pratchett Firefox extension.
Using the Server Header Checker.

Note that the HTTP header is not sent if you use a page caching plugin. To send the HTTP header and continue to use a caching plugin, add the header at the server level. See http://www.gnuterrypratchett.com/ for options.
Checking the meta tag is added
You can check that the meta tag is visible by viewing your site’s HTML source and searching for “GNU Terry Pratchett”.
The Clacks Overhead plugin for Chrome and the GNU Terry Pratchett extension for Firefox both light up when they detect the HTML meta tag or HTTP header.
Credits and contributions
Inspired by this reddit post, boingboing’s report, and the GNU Terry Pratchett website.
Contributions welcome at the GitHub repo.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon