Linux 软件免费装
Banner图

PinSwitch User Switcher

开发者 jawad0501
更新时间 2026年9月1日 12:37
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

development testing capabilities roles user switching

下载

1.2.1

详情介绍:

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 Pinning Admin bar panel Profile & user screens 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.

安装:

  1. Upload the plugin files to /wp-content/plugins/pinswitch-user-switcher, or install through the WordPress plugins screen.
  2. Activate the plugin through the Plugins screen.
  3. Go to Users, pin your test accounts using the Pin row action.
  4. During testing, open Switch User from the admin bar and click a pinned account.

屏幕截图:

  • Switch To button on user edit screen

升级注意事项:

1.2.1 Uses WordPress script enqueue APIs for the user edit Switch To button. 1.2.0 Renamed to PinSwitch User Switcher. Re-activate after updating the plugin folder/slug. 1.1.5 Fixes the admin bar user list failing to load. 1.1.4 User emails in the Switch User panel no longer get cut off. 1.1.3 Switch User panel opens on hover; clicking a user opens their profile. 1.1.2 Switch Off is now available in the profile menu on the top-right admin bar. 1.1.1 Switch Off and switch-back links now work when testing as non-admin roles on the frontend. 1.1.0 The settings page is removed. Pin and unpin users from the Users list or the admin bar All users tab. 1.0.6 Switch To button on user edit screens now appears next to Add User.

常见问题:

Who can use PinSwitch User Switcher?

Users with the edit_users capability can pin users, open the Switch User panel, and switch into other accounts.

Does this replace User Switching?

Yes. PinSwitch User Switcher is standalone. It implements its own switch-to, switch-back, and switch-off flow using WordPress auth cookies and session tokens, so you do not need another switching plugin installed.

What happens if I switch to a user who cannot access the current admin page?

PinSwitch User Switcher checks whether the switched-in user can access the page you were on. If not, they are redirected to the admin dashboard (if they have admin access) or the site homepage — not an "Sorry, you are not allowed" error screen.

Are pins shared between admins?

No. Pins are stored against your own user account and are visible only to you.

Does PinSwitch User Switcher work on Multisite?

Multisite is not a priority for v1. It may work incidentally but is not tested or supported.

更新日志:

1.2.1 1.2.0 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0