外掛說明
The Smart User Slug Hider Plugin hides usernames in Author Pages URLs to enhance Security
Retired Plugin
Development, maintenance and support of this plugin has been retired in october 2023. You can use this plugin as long as is works for you.
There will be no more updates and I won’t answer any support questions. Thanks for your understanding.
Feel free to fork this plugin.
使用方式
這個外掛會自動使用 16 位編碼字串取代使用者名稱。不需進行額外設定,僅需安裝並啟用。停用外掛後便會復原 WordPress 預設行為。
使用這個外掛的原因
WordPress 核心程式的作者頁面網址一般都是 example.com/author/name
,name
代表使用者的登入名稱。
這代表全站使用者的登入名稱為公開可見,算是一個資訊安全問題。
Smart User Slug Hider 會變更作者頁面網址,例如從 example.com/author/john
變更為類似 example.com/author/e9e716def73f76ac
的網址。
經過編碼的使用者代稱為自動產生,且不會與實際使用者名稱有對應關係,但 WordPress 原有的預設使用者代稱網址會產生 404 找不到錯誤。
短代碼
這個外掛加入 3 個可用於網站文章的短代碼:
[smart_user_slug]
:顯示該篇文章作者的使用者代稱,例如 e9e716def73f76ac。[smart_user_url]
:顯示該篇文章作者的個人資料頁面網址,例如 example.com/author/e9e716def73f76ac (以文字顯示)。[smart_user_link]
:顯示作者名稱,並為作者名稱加入其個人資料頁面連結。
佈景主題函式庫
這個外掛加入 2 個可用於佈景主題檔案的函式:
- 使用
get_smart_user_slug( $author_id )
以取得作者的使用者代稱:$author_id 為選用參數。如果省略這個選用參數,則會顯示目前文章作者的作者 ID。 - 使用
the_smart_user_slug( $author_id )
以顯示作者的使用者代稱:$author_id 為選用參數。如果省略這個選用參數,則會顯示目前文章作者的作者 ID。
外掛隱私權資訊
- 這個外掛不會設定 Cookie。
- 這個外掛不會收集或儲存任何資料。
- 這個外掛不會將資料傳送至網站以外的伺服器。
使用者評論
參與者及開發者
變更記錄
4.0.4 (2022-10-05) FINAL VERSION
- removed all links to webiste
- removed request for rating
4.0.3 (2023-03-26)
- do not rely on SERVER_ADDR only (see support ticket)
4.0.2 (2022-05-28)
- just cosmetics
- Plugin Foundation updated to PPF08
4.0.1 (2020-08-23)
- minor UI adjustments
4.0.0 (2019-12-29)
- remove user class from body tag (See here)
- always use Future Proof Mode, old method removed
- rewritten based on my Plugin Foundation PPF03
3 (2018-12-31)
- Future Safe Mode renamed to Future Proof Mode
- automatically activate Future Proof Mode if mcrypt is not availabe
- code improvement
- UI improvements
- changed capability to manage_options to display admin page
2 (2018-03-14)
- Future Safe Mode
1.5 (2017-11-16)
- faulty display in WP 4.9 fixed
1.4 (2017-07-15)
- fix for BuddyExtender plugin
1.3 (2017-07-17)
- BuddyPress compatibility
- redesigned admin interface
- code improvement
1.2 (2016-10-04)
- Shortcodes added
- Theme Functions added
1.1 (2016-06-30)
- Code optimization
- Plugin info page added
1.0 (2014-10-02)
- Initial Release