[WordPress] 外掛分享: Latest Post Date

首頁外掛目錄 › Latest Post Date
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
10+
安裝啟用
尚無評分
6352 天前
最後更新
問題解決
WordPress 2.0+ v1.01 上架:2008-10-26

內容簡介

此外掛新增兩個範本標籤:latest_post_date() 和 latest_post_modified_date()。第一個標籤會顯示最新文章的發佈日期,第二個標籤會顯示最新修改文章的修改日期。

每個範本標籤都有兩個參數:$date_format 以標準 WP 日期格式化字串輸出日期(預設為您的 WP 網誌的預設日期格式),$echo 決定是否直接輸出日期(為 TRUE)或回傳日期用於 PHP(為 FALSE),預設為 TRUE。

例如: <?php latest_post_date( 'l, F j, Y', TRUE ); ?> 可以回傳類似於「Friday, September 24, 2004」的日期供 PHP 使用。另一個範例: <?php latest_post_date(); ?> 會以您的 WP 網誌預設格式化輸出日期。

如果您對此外掛有任何功能建議,歡迎與我討論或提出功能贊助: 聯絡我。

如有任何問題,歡迎與我聯絡:聯絡我。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Adds two template tags, latest_post_date() and latest_post_modified_date(), the first echoes the most recent post publication date, the second echoes the modification date of the most recently modified post.
Each template tag takes two params: $date_format, standard WP date formatting string (defaults to the default date formatting for your WP blog), and $echo, display the date, if TRUE, or return the date to be used in PHP, if FALSE, (defaults to TRUE).
For example: would return a date similar to Friday, September 24, 2004 for use in PHP. Another example: would echo a date in the default formatting for your WP blog.
Is this plugin lacking a feature you want? I’m happy to discuss ideas, or to accept offers of feature sponsorship: contact me and we can have a chat.
Any issues: contact me.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon