[WordPress] 外掛分享: Current Date & Time Widget

首頁外掛目錄 › Current Date & Time Widget
200+
安裝啟用
尚無評分
6470 天前
最後更新
問題解決
WordPress 2.3+ v1.0.3 上架:2008-06-12

內容簡介

這是一個相當簡單的外掛程式,可用於在任何支援小工具(widget-enabled)的地方顯示日期和時間。

這個外掛程式有兩個目標:

提供一種方法來讓產生的日期和時間與指定的時區相符。
允許完全自定義日期和時間的格式。

我認為我已經相當成功地實現了這些目標。不過,設定任一字段並不太友善。指定的時區必須與 PHP支援的時區列表 相符。日期和時間的格式要求與 PHP的date() 函數的格式參數 相同(因為明顯的原因,定義的格式實際上是直接傳遞到代碼中的 date 函數 🙂)。

如果這個外掛程式得到足夠的關注和使用,我會想辦法簡化使用。我認為一系列下拉選單會使選擇選項更容易,因此如果人們感興趣,這將是使用的選項。如果你是那些感興趣的人之一,請在我們的聯繫頁面上給我發消息。

版本歷史

1.0.1 - 2008-06-04 - 基本原型
1.0.2 - 2008-06-12 - 將插件代碼包含在一個類中,以避免命名空間衝突。使用編碼風格進行標準化 (http://comox.textdrive.com/pipermail/wp-hackers/2006-July/006930.html)
1.0.3 - 2008-07-01 - 增加對 PHP 4 的支援

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.3) 或搜尋安裝

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

原文外掛簡介

This is a fairly simple plugin used to display the date and time in any widget-enabled location.
There were two goals for this plugin:

Provide a means to have the date and time produced match a specific timezone.
Enable complete customization over how the date and time is formatted.

I think that I’ve done a fairly good job of meeting those goals. Admittedly, setting either field is fairly user-unfriendly. The timezone specified must match PHP’s List of Supported Timezones. The date and time format has the same requirements as the format parameter of PHP’s date() function (for obvious reasons since the defined format is actually passed directly to the date function in the code 🙂 ).
If this plugin gets enough attention and use, I’ll find ways of easing the use. I think a series of drop-downs would make selecting the options easier, so that would be the option used if people are interested. If you happen to be one of those interested people, please send me a message on our contact page.
Version History

1.0.1 – 2008-06-04 – Basic proof of concept
1.0.2 – 2008-06-12 – Contained plugin code inside a class to prevent namespace collisions. Standardized code with coding style (http://comox.textdrive.com/pipermail/wp-hackers/2006-July/006930.html)
1.0.3 – 2008-07-01 – Added support for PHP 4

延伸相關外掛

文章
Filter
Apply Filters
Mastodon