[WordPress] 外掛分享: Minimalistic Event Manager

首頁外掛目錄 › Minimalistic Event Manager
WordPress 外掛 Minimalistic Event Manager 的封面圖片
70+
安裝啟用
★★★★
4.5/5 分(4 則評價)
3131 天前
最後更新
問題解決
WordPress 3.0+ v1.1.1 上架:2012-11-01

內容簡介

這個外掛(MEM or Minimalistic Event Manager)是為主題作者和開發人員設計的,他們希望有一個簡單、堅固和靈活的解決方案來管理活動日期。

MEM 外掛提供了一個乾淨的介面,允許在文章(以及任何自訂文章類型)中新增活動日期(開始日期、結束日期、重複日期)。

主要特點

活動日期可附加在任何文章類型上:文章、頁面、自訂文章類型…(可以選擇性限制在特定的內容類型上)。
有三種活動日期類型:開始日期、結束日期、重複日期。
沒有強制性的日期格式:時間、日期和月份都是可選的。活動日期可以是“2046年1月”,也可以是“2046年”。

外掛不能做的事情

MEM 外掛可作為輸入該日期至自訂欄位的一個簡單介面,但在您的主題的公開面上並不能做太多事情(只有一個顯示活動列表的簡單小工具)。

該外掛主要是為了讓主題開發人員在前端創建自己的活動顯示而設計的。

如果您不確定如何實現這一點,我們的 Wiki將提供一系列範例以供參考。

技術實現

從技術上講,MEM 外掛將日期以機器可讀格式(例如“2016-11-23 13:37”)存儲為普通的自訂欄位。這使您有絕對自由地在您的主題中顯示您的活動:

您可以使用 meta_key / meta_compare 參數查詢特定日期範圍。
您可以使用 PHP 的 date 函數以任何可能的方式顯示日期(或使用 date_i18n 進行適當的本地化)。

外掛選項

這個插件有兩個設置可以通過在您的 functions.php 文件中修改幾行來更改:

您可以將其限制在特定的文章類型上。
您可以使用“alpha”模式,在每個日期的空輸入欄位上提供一個空白的輸入欄。如果您需要輸入不符合預定格式的日期,這可能會很有用。

有關完整說明的線上文檔,請參見。

連結

文檔

鳴謝

概念和維護:ms-studio.net
最初的開發:Dream Production

外掛標籤

開發者團隊

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

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

原文外掛簡介

This plugin (MEM or Minimalistic Event Manager) is intended for theme authors and developers who want a simple, robust and flexible solution for managing event dates.
The MEM plugin offers a clean interface that allows to add event dates (start dates, end dates, repeating dates) to posts (and to any custom post type).
The main features

Event dates can be attached to any post type: Posts, Pages, Custom Post Types… (optionally, they can be restricted to specific content types).
Event dates can be of three types: start dates, end dates, repeating dates.
There is no mandatory date format: Time, Day, and Month are optional. An event date could be “January 2046”, or just “2046”.

What the plugin doesn’t do
The MEM plugin works as a simple interface for entering those dates into custom fields, but it won’t do much on the public side of your theme (there’s a simple widget for displaying a list of events).
The plugin was created primarily to enable theme developers to create their own display of events on the front-end.
If you aren’t sure how to achieve this, our wiki will provide a collection of examples to get you started.
Technical implementation
Technically, the MEM plugin stores the dates as ordinary Custom Fields, in a machine-readable format (such as “2016-11-23 13:37”). This gives you absolute freedom for displaying your events in your theme:

You can query for specific date ranges by using the meta_key / meta_compare parameters.
You can use the php date function to display the date in any possible manner (or date_i18n for proper localization).

Plugin options
The plugin has two settings that can be modified with a few lines in your functions.php file:

You can limit it to specific post types.
You can use an “alpha” mode, which gives you a blank input field for each date. This can be useful if you need to enter dates that don’t fit the predefined format.

See the online documentation for the full instructions.
Links
Documentation
Credits

Concept and maintenance ms-studio.net
Initial development: Dream Production

延伸相關外掛

文章
Filter
Apply Filters
Mastodon