內容簡介
這個外掛是基於 Lester Chan 的 Relative Date 外掛 所開發。
這個外掛的目標是讓事情變得更加簡單。這個外掛能夠:
取代文章中的 the_date()
取代評論中的 get_comment_date() 或 comment_date()
需要注意的是,如果你的佈景主題在撰寫日期時使用了不同的格式,這個外掛是無法運作的。你必須將佈景主題中的日期函數
改成上述其中一個函數(例如在 TwentyTen 佈景主題中,取代 twentyten_posted_on() 的是 the_date())。
另外一個需要注意的點是,如果你正在使用預設的 WordPress 評論呈現方式,評論取代功能將無法運作,
因為 WordPress 預設的呈現方式也會呼叫 get_comment_time()。你必須以自訂的回呼函數用在
wp_list_comments( array( ‘callback’ => ‘your_customized_function_here’ )) 中。(好吧,事情可能沒有那麼簡單 :/)
這個外掛有一個選項頁面(位於管理員設定),您可以在那裡選擇要取代的日期(文章/評論)。文章日期預設是勾選的。
附上葡萄牙文翻譯。
外掛標籤
開發者團隊
原文外掛簡介
This was based on Lester Chan’s Relative Date plugin.
It tries to simplify things a bit. This plugin can:
Replace the_date() in the post
Replace get_comment_date() or comment_date() in the comments
Note that if your theme is writing the date in a different form, it won’t work. You have to
replace its function call to one of the above (in the TwentyTen theme for example, replace twentyten_posted_on()
by the_date().
Also important to say that, comment replacement won’t work if you are using the default wp comment renderer because
it calls get_comment_time() as well. You have to do a customized callback function to use with
wp_list_comments( array( ‘callback’ => ‘your_customized_function_here’ ) ). (ok, maybe things were not
simplified that much :/)
There is a options page (under settings in the Admin) where you can choose which dates you
want to replace (posts/comments). Posts date are by default checked.
Portuguese translation included.
