內容簡介
此外掛新增兩個範本標籤: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 網誌預設格式化輸出日期。
如果您對此外掛有任何功能建議,歡迎與我討論或提出功能贊助: 聯絡我。
如有任何問題,歡迎與我聯絡:聯絡我。
外掛標籤
開發者團隊
原文外掛簡介
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.
