
內容簡介
e links.
sidebar_login_widget_end – Fired after the widget.
這是一個 WordPress 的外掛,Sidebar Login 可以為您的 WordPress 博客添加一個有用的登錄小工具,您可以在 WordPress 博客的側欄中使用它進行登錄。
當用戶登錄後,他們將被重定向回他們登錄時所在的頁面,而不是管理面板(可配置)。
如果您想為該插件貢獻程式碼,您可以通過GitHub進行貢獻。
如果您想貢獻翻譯,該項目托管在 WordPress.org 上。
用法
只需轉到外觀>小工具,並將“側欄登錄”拖到您選擇的側欄即可。在小工具中,您可以使用多個選項來更改顯示給用戶的標題或鏈接。
要在模板中使用此小工具,請使用 WordPress 提供的the_widget() 函数 。
標題+鏈接標籤
這些標籤可用於標題+鏈接的小工具設置中,在運行時將被替換。
%username% - 登錄用戶顯示名稱
%userid% - 登錄用戶ID
%firstname% - 登錄用戶名
%lastname% - 登錄用戶姓氏
%name% - 登錄用戶名+姓氏
%nicename% - 用戶別名
%admin_url% - WP管理面板的 URL
%logout_url% - 登出 URL
%buddypress_profile_url% - Buddypress個人資料正文的 URL
%bbpress_profile_url% - bbPress論壇個人資料的 URL
%avatar% - 用戶頭像
過濾器參考
sidebar_login_include_css - 返回 false 不包含 CSS 樣式表
sidebar_login_widget_logged_in_links - 登錄後顯示的鏈接數組。
sidebar_login_widget_logged_out_links - 登出後顯示的鏈接數組。
sidebar_login_widget_display - 返回 false 隱藏小工具。
sidebar_login_widget_logged_in_title - 登錄時顯示的小工具標題。
sidebar_login_widget_avatar_size - 頭像大小 - 默認為38px
sidebar_login_widget_logged_out_title - 登出時顯示的小工具標題。
sidebar_login_widget_form_args - wp_login_form 函數的参數。
sidebar_login_widget_login_redirect - 登入後重新導向的 URL。
sidebar_login_widget_logout_redirect - 登出後重新導向的 URL。
sidebar_login_widget_register_url - 注册鏈接的 URL。
sidebar_login_widget_lost_password_url - 遺忘密碼鏈接的URL
sidebar_login_widget_wp_login_form - 登錄表單的 HTML。
操作参考
sidebar_login_widget_start - 小工具之前啓動。
sidebar_login_widget_{logged_in || logged_out}_content_start - 小工具內容之前啓動。
sidebar_login_widget_before_{logged_in || logged_out}_links - 鏈接之前啓動。
sidebar_login_widget_after_{logged_in || logged_out}_links - 鏈接之後啓動。
sidebar_login_widget_end - 小工具結束後啓動。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
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, use the the_widget() function which WordPress provides.
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
%admin_url% – url to WP admin
%logout_url% – logout url
%buddypress_profile_url% – Buddypress Profile URL
%bbpress_profile_url% – Buddypress 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 38 (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
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.
