
內容簡介
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.
