[WordPress] 外掛分享: Post Date Block: Published & Modified

首頁外掛目錄 › Post Date Block: Published & Modified
WordPress 外掛 Post Date Block: Published & Modified 的封面圖片
全新外掛
安裝啟用
尚無評分
78 天前
最後更新
問題解決
WordPress 6.9+ PHP 7.4+ v1.0.0 上架:2026-01-23

內容簡介

總結:此外掛擴展了核心的「文章日期」區塊變化,將修訂日期添加到區塊中,當它與發佈日期不同時(在提供的日期格式中呈現)。您可以為兩個日期設定前綴和後綴,並將修改日期顯示在單獨的行上。

HTML標籤的項目清單:

- 這個外掛擴展了核心的「文章日期」區塊變化,專門針對日期區塊的「文章日期」變化。
- 在區塊中附加了修改日期,每當它與發佈日期不同時(在提供的日期格式中呈現)。
- 您可以為這兩個日期配置前綴和後綴,並將修改日期顯示在單獨的行上。
- 要查看此外掛的詳細介紹,請查看我的部落格文章。
- 這是 gutenberg#53099 的一個原型或臨時解決方案(文章日期:不清楚「顯示修改日期」是否取代了發佈日期)。
- 請參閱 gutenberg#61920(為文章日期區塊添加前綴/後綴)。最終加入核心的功能將希望利用「shortblocks」,這樣條件前綴和後綴就不必在區塊設定面板中提供。
- 使用方法:
- 打開站點編輯器以編輯區塊模板。
- 插入日期區塊。
- 在區塊設定中,點擊「轉換為變化」按鈕,選擇「文章日期」。
- 一個新的「包含修改日期」面板將出現在設定中。啟用「當修改日期不同於發佈日期時顯示修改日期」切換按鈕。
- 配置當兩者於所選日期格式中不同時,發佈日期和修改日期的前綴和後綴;可選啟用切換按鈕以在單獨一行上顯示修改日期。
- 注意:編輯器中目前沒有預覽。要查看更改,保存區塊模板並在前端導航到至少在發佈後一天內修改過的文章。

外掛標籤

開發者團隊

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

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

原文外掛簡介

This plugin extends the core Post Date block variation, specifically the “Post Date” variation of the Date block. It appends the modified date to the block whenever it differs from the published date (when rendered in the provided date format). You can configure prefixes and suffixes for both dates, and you can display the modified date on a separate line.
For a full writeup of this plugin, see my blog post.
This is a prototype or stopgap for gutenberg#53099 (Post date: It is not clear that “display modified date” replaces the publishing date). See also gutenberg#61920 (Add prefix / suffix to Post Date block). What eventually lands in core will hopefully leverage “shortblocks” so that the conditional prefixes and suffixes needn’t be provided in a block settings panel.
Usage

Open the Site Editor to edit a block template.
Insert a Date block.
In the block settings, click the “Transform to variation” button and select “Post Date”.
A new “With Modified Date” panel appears in the settings. Enable the “Show modified date when different from published date” toggle.
Configure the prefixes and suffixes for the published date and modified date when the two differ for the selected date format; optionally enable the toggle to show the modified date on a separate line.

Note: There is currently no preview in the editor. To see the changes, save the block template and navigate on the frontend to a post that has been modified at least a day after publishing.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon