[WordPress] 外掛分享: By this Author

首頁外掛目錄 › By this Author
WordPress 外掛 By this Author 的封面圖片
全新外掛
安裝啟用
尚無評分
2657 天前
最後更新
問題解決
WordPress 4.1+ v1.1.0 上架:2015-01-21

內容簡介

有時候在網站上的文章並不是由相應的註冊使用者撰寫,但仍需要以某種方式歸功於他們。

這個外掛專門處理這種情況,並提供解決方案。

說明如下:文章與相應人物的名字進行標籤化。
因此,當製作作者簡介頁面時,可以插入一個短碼,以顯示由註冊使用者編寫或歸因的文章清單。
如果使用者以同樣的名字註冊並開始發布自己的文章,則它們將自動插入到作者簡介頁面中。

短碼如下:

[by-this-author name="作者名稱" post_types="authored_by, attributed_to" posts_per_page=#]

post_types為可選,可能包含一個或兩個關鍵詞
posts_per_page為可選,用於指定顯示的文章數

沒有分頁支援,因此限制非常長的頁面的唯一方法是使用posts_per_page參數。

此外,外掛解決了非常特定的網站上的特定問題。對別人也有用。

提供一個翻譯文件for it_IT。

還有兩個無關的短碼。

年齡計算

[get-age ref_date="參考日期" end_date="結束日期"]

計算發生在參考日期之後幾歲(以年計)。除非指定end_date,否則計算一直持續到當前時刻。
這是用於顯示人員的年齡(可能在其死亡時)可能也適用於具有開始和可能有結束日期的其他事件。

ref_date是年齡所指的日期(通常在過去)
end_date是可選的,表示計算年齡的日期上限(通常也在過去,但也可能是未來)

時間機器

[time-machine ref_time="參考時刻" future_text="參考時刻之前的文字" past_text="參考時刻之後的文字"]

根據當前時刻相對於參考時刻來更改文章內容的外掛。

假設一篇文章在事件之前發布,它應該用未來的方式提到該事件。
然而,在事件(參考時間)發生後,同一篇文章應該用過去的方式提到該事件。
這個簡單的更改避免了文章看起來過時,直到您手動編輯它以添加事件後的信息。

ref_time是事件的日期和時間。在事件之後的午夜之前顯示future_text,然後顯示past_text。
future_text為事件仍在未來時顯示的文字
past_text為事件過去時顯示的文字

外掛標籤

開發者團隊

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

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

原文外掛簡介

Sometimes in a website the articles are not authored by the respective registered users but still need to be attributed to them somehow.
This plugin addresses this specific situation and offers a way to deal with it.
The idea is that articles are tagged with the names of people to which they should be attributed.
Thus, when making an author’s bio page a shortcode can be inserted that will show a list of articles authored by or attributed to a registered user.
If the user later registers using the same name and starts publishing his/her own posts, they will auto-magically be inserted in his bio page.
The shortcode is:
[by-this-author name="name of the author" post_types="authored_by, attributed_to" posts_per_page=#]

post_types is optional and may contain one of or both keywords
posts_per_page is optional and specifies how many posts to display
There is no support for pagination so the only way of limiting very long pages is to use the posts_per_page parameter.
The plugin solves a very specific problem of a very specific website. It may be useful to someone else too.
A single translation file is provided for it_IT.
There are two other, unrelated, shortcodes included.
Age calculation
[get-age ref_date="reference date" end_date="end date"]

Calculates the age (in years) since a reference date. The age is calculated until the current moment, unless end_date is specified.
This is meant to show ages of people (possibly at the time of their death) but may also be used for other events that have a start and maybe an end date.
ref_date is the date (typically in the past) to which the age refers
end_date is optional and represents the date up to which the age is calculated (typically in the past too but may also be in the future)
Time machine
[time-machine ref_time="reference moment" future_text="text to show before ref_time" past_text="text to show after ref_time"]

Allows altering the text of the post based on the current moment relative to a reference moment.
Suppose a post is published before an event, is should refer to that event in terms of the future.
However, after the time of the event (the reference time) has passed, the same post should refer to the event in terms of the past.
This simple change avoids the post looking stale until you manually edit it to maybe add post-event information.
ref_time is the date and time of the event; up until midnight after the event it will show the future_text, then the past_text
future_text is the text to show while the event is still in the future
past_text is the text to show when the event is in the past

延伸相關外掛

文章
Filter
Mastodon