[WordPress] 外掛分享: Sidebar Login

首頁 › 外掛目錄 › Sidebar Login
WordPress 外掛 Sidebar Login 的封面圖片
9,000+
安裝啟用
★★★★☆
4.5/5 分(78 則評價)
17 天前
最後更新
—
問題解決
WordPress 6.6+ PHP 7.4+ v3.1.0 上架:2008-08-01

內容簡介

Sidebar Login 外掛提供一個方便的登入小工具,讓使用者可以在 WordPress 網站的側邊欄進行登入。登入後,使用者會被重定向回他們登入的頁面,提升使用體驗。

【主要功能】
• 提供側邊欄登入小工具
• 登入後重定向至原頁面
• 支援自訂標題與連結顯示
• 可透過 GitHub 貢獻程式碼
• 支援多種使用者資訊標籤

外掛標籤

開發者團隊

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

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

原文外掛簡介

Sidebar Login adds a useful login widget which you can use to login from in the sidebar of your WordPress powered blog.
Once a user logs in they are redirected back to the page they logged in from, rather than the admin panel (this is configurable).
If you’d like to contribute code to the plugin you can do so via GitHub.
If you’d like to contribute a translation, the project is hosted on WordPress.org.
Usage
Simply go to Appearance > Widgets and drag “sidebar login” to the sidebar of your choice. Within the widget are several options you can use for changing the titles or the links displayed to the user.
To use this widget in a template, call the_widget() with the Sidebar_Login_Widget class, for example the_widget( 'Sidebar_Login_Widget' );.
Tags for titles + links
These tags can be used in the widget settings for titles + links and will be replaced at runtime.

%username% – logged in users display name
%userid% – logged in users ID
%firstname% – logged in users firstname
%lastname% – logged in users lastname
%name% – logged in users firstname + lastname
%nicename% – user nice name
%site_url% – url of your site
%admin_url% – url to WP admin
%logout_url% – logout url
%buddypress_profile_url% – BuddyPress Profile URL
%bbpress_profile_url% – bbPress Profile URL
%avatar% – User Avatar

Filter Reference

sidebar_login_include_css – return false to not include the CSS stylesheet
sidebar_login_widget_logged_in_links – An array of links shown when logged in.
sidebar_login_widget_logged_out_links – An array of links shown when logged out.
sidebar_login_widget_display – Return false to hide the widget.
sidebar_login_widget_logged_in_title – The widget title shown when logged in.
sidebar_login_widget_avatar_size – The avatar size – defaulted to 48 (thats in px)
sidebar_login_widget_logged_out_title – The widget title shown when logged out.
sidebar_login_widget_form_args – Arguments for the wp_login_form function.
sidebar_login_widget_login_redirect – Redirect URL after login.
sidebar_login_widget_logout_redirect – the redirect after logging out.
sidebar_login_widget_register_url – The URL for registration links.
sidebar_login_widget_lost_password_url – The URL for lost password links.
sidebar_login_widget_wp_login_form – The HTML of the Login form.

Action Reference

sidebar_login_widget_start – Fired before the widget.
sidebar_login_widget_{logged_in || logged_out}_content_start – Fired before the widget content.
sidebar_login_widget_before_{logged_in || logged_out}_links – Fired before the links.
sidebar_login_widget_after_{logged_in || logged_out}_links – Fire after the links.
sidebar_login_widget_{logged_in || logged_out}_content_end – Fired after the widget content.
sidebar_login_widget_end – Fired after the widget.

Notes

After logging in, users are only redirected to pages on your site. To allow other hosts, use the allowed_redirect_hosts filter.
Due to AJAX not working across different domains (see same_origin_policy), AJAX logins will be disabled if your site it non-SSL, but the FORCE_SSL_ADMIN constant is set to true. Instead it will fallback to a traditional POST.

延伸相關外掛

文章
Filter
Mastodon