[WordPress] 外掛分享: PinSwitch User Switcher

首頁外掛目錄 › PinSwitch User Switcher
WordPress 外掛 PinSwitch User Switcher 的封面圖片
全新外掛
安裝啟用
尚無評分
11 天前
最後更新
問題解決
WordPress 6.2+ PHP 8.0+ v1.2.1 上架:2026-08-31

內容簡介

PinSwitch User Switcher 是一款幫助外掛開發者測試角色基礎行為的工具,讓使用者能快速切換不同的測試帳號,提升開發效率,避免重複搜尋使用者列表。

【主要功能】
• 即時切換使用者,無需重複搜尋
• 支援快速返回原始帳號
• 允許登出但保留切換能力
• 針對每位管理員儲存釘選使用者
• 管理介面上可搜尋所有使用者
• 每個使用者行顯示詳細資訊

外掛標籤

開發者團隊

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

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

原文外掛簡介

PinSwitch User Switcher helps plugin developers test role-based behavior without repeatedly hunting through the Users screen.
When you are building a plugin, you often need to jump between an admin account and a handful of fixed test users (Editor, Subscriber, Customer, etc.). Existing user switching plugins work, but they still make you find the same accounts in the user list every time. PinSwitch User Switcher adds a pinning layer on top of a complete, standalone switching implementation.
Switching

Switch To — log in as another user instantly
Switch Back — return to your original account
Switch Off — log out while keeping the ability to switch back
Standalone auth-cookie and session-token implementation (no dependency on User Switching or similar plugins)
Smart redirects after switching — if the target user cannot access the page you were on, they are sent to the dashboard or homepage instead of an unauthorized error

Pinning

Pin or unpin users from the Users list row actions or the admin bar All users tab
Pins are stored per admin in usermeta (no custom database tables)

Admin bar panel

Switch User menu on all wp-admin screens — opens on hover
Pinned and All users tabs
Search all users by username or email
Infinite scroll loading (20 users at a time)
Each row shows avatar, name, role, login, email, and a Switch To action
Click a user row to open their profile; use Switch To to switch accounts
Fixed-height, scrollable panel (no full-screen dropdown)

Profile & user screens

Switch To button on every user edit screen (next to Add User)
Switch To button in the Personal Options section of user profiles

Permissions
Users with the edit_users capability can pin users and switch accounts. Switch back uses cookie authentication and does not require the switched-in user to have elevated capabilities.
PinSwitch User Switcher is intentionally small: no audit log, no multisite-specific code, no CLI, no REST API layer, and no dependency on other switching plugins.

延伸相關外掛

文章
Filter
Mastodon