前言介紹
- 這款 WordPress 外掛「Log Out Shortcode」是 2014-08-02 上架。
- 目前有 3000 個安裝啟用數。
- 上一次更新是 2024-07-17,距離現在已有 291 天。
- 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
- 有 12 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
link | logout | log out | shortcode |
內容簡介
這個外掛有三個短碼:
[logout] - 標準的登出鏈接,在登出後用戶仍然停留在登錄頁面上。
[logout_to_home] - 登出鏈接,登出後重定向到您的首頁。
[logout_to_current] - 登出鏈接,登出後重定向回當前頁面/URL。
進階用法:
所有三個短碼都支援 3 個屬性/參數:
[logout text="" class="" redirect=""]
支援的三個屬性/參數如下:
text=""
– 用於鏈接錨文本的文字。
– 預設值:Log Out
class=””
– 用於鏈接的 HTML 類名。多個類名應該用空格分開。
– 預設值:logout
redirect=””
– 用戶在登出後要重定向的路徑/URL。
– 預設值:WordPress 登錄頁面。
– 注意:必須是與 WordPress 網站相同域名的 URL 或路徑(不能是外部域名/URL)。
一些範例:
[logout text=”Log Off”] – 一個名為 Log Off 的登出鏈接。
[logout redirect=”/members/”] – 登出之後,將用戶重定向到/members/。
[logout_to_home text=”Log Off”] – 一個名為 Log Off 的登出鏈接,登出後重定向到您的首頁。
[logout class=”log-out-link”] – 為登出鏈接使用自定義的 CSS/HTML 類名稱。
注意:如果用戶未登錄,短碼將返回空/無內容。
這個外掛的靈感來自 Ben Poland 的 Logout Button 外掛。
如果您喜歡,可以在 GitHub 為這個外掛做貢獻。
原文外掛簡介
There are 3 shortcodes that can be used:
[logout] - A standard Log Out link, where the user stays on the login screen after being logged out.
[logout_to_home] - A link that logs the user out, and redirects them to your home page.
[logout_to_current] - A link that logs the user out, and redirects them back to the current page/URL.
Advanced Usage:
All 3 shortcodes all support 3 attributes/parameters:
[logout text="" class="" redirect=""]
The 3 supported attributes/parameters are:
text=""
– The text to use for the link anchor text.
– Default: Log Out
class=””
– The HTML class(es) to use for the link. Multiple classes should be separated by a space.
– Default: logout
redirect=””
– The path/URL to redirect the user to after they are logged out.
– Default: the WordPress login screen.
– Note: must be a URL or path on the same domain name as the WordPress website (cannot be an external domain/URL)
Some Examples:
[logout text=”Log Off”] – A Log Off link that logs the user out.
[logout redirect=”/members/”] – Log the user out, and redirect them to /members/.
[logout_to_home text=”Log Off”] – A Log Off link that logs the user out and redirects them to your home page.
[logout class=”log-out-link”] – Use a custom CSS/HTML class name for the log out link.
Note: the shortcodes will return nothing/empty if the user isn’t logged in.
This plugin is inspired by the Logout Button plugin by Ben Poland.
If you like, you can contribute to this plugin on GitHub.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Log Out Shortcode」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.0.1 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | trunk | v1.0.2 |
延伸相關外掛(你可能也想知道)
Logout Button 》這個外掛可以視為前端登出解決方案。它允許 WordPress 管理員在任何頁面(或文章)嵌入一個連結,讓其他 WordPress 使用者可以輕鬆登出,而不必煩惱 WordPres...。
Get Login Plugin 》該外掛會分別將「登入」、「登出」、「註冊」和「我的個人檔案」加入使用「wp_list_pages」列出的導覽選單中,當使用者單擊這些項目時,他們將會被重新導向到...。
Logout to Homepage 》此外掛讓使用者在登出 WordPress 後會直接導向回首頁,而不是登入頁面。。
Logout Link Placement Plugin 》這個外掛在管理面板的左側導航欄加入了登出連結,讓你可以輕鬆登出。, 支援 |, 更新日誌 |, 常見問題|, 一些功能:, , 可透過管理面板左側導航欄的連結輕鬆登...。