Title: Admin Bar User Switching
Author: Saad Iqbal
Published: <strong>2014年11月27日</strong>
Last modified: 2022年5月24日

---

プラグインを検索

![](https://ps.w.org/admin-bar-user-switching/assets/banner-772x250.png?rev=1419846)

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://ps.w.org/admin-bar-user-switching/assets/icon-128x128.png?rev=1419846)

# Admin Bar User Switching

 作者: [Saad Iqbal](https://profiles.wordpress.org/saadiqbal/)

[ダウンロード](https://downloads.wordpress.org/plugin/admin-bar-user-switching.1.4.zip)

 * [詳細](https://ja.wordpress.org/plugins/admin-bar-user-switching/#description)
 * [レビュー](https://ja.wordpress.org/plugins/admin-bar-user-switching/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/admin-bar-user-switching/#installation)
 * [開発](https://ja.wordpress.org/plugins/admin-bar-user-switching/#developers)

 [サポート](https://wordpress.org/support/plugin/admin-bar-user-switching/)

## 説明

This plugin was originally developed by [Mark Wilkinson](https://markwilkinson.me/).

An admin bar “Switch to User” option is provided which on hover provides a search
box where you can query a user to switch to. The results are links to switch to 
that user. This plugin is great for when you are building sites for clients and 
it is beneficial to see the site as your logged in client see’s it.

And there is an optional mode where you can use a custom keyboard combination, say‘
su’, and it activates the form where you search for users, and then you can use 
keyboard arrows to navigate the list of results, and the return key to switch to
the selected user. The same combo can be used to focus the ‘Switch Off’ link, following
a return to simulate a click.

To activate this feature and set the custom keyboard combination, aka magic word,
you need to use the `abus_ajax_args` and add a ‘magicWord’ variable.

Note that keyboard navigation is not dependant on the custom keyboard combination,
and can be used out of the box.

## スクリーンショット

[⌊A Switch to user item is added to the WordPress admin bar to allow you to search
for a user to switch to.⌉⌊A Switch to user item is added to the WordPress admin 
bar to allow you to search for a user to switch to.⌉[

A Switch to user item is added to the WordPress admin bar to allow you to search
for a user to switch to.

## インストール

To install the plugin:

 1. Upload to the `/wp-content/plugins/` directory
 2. WordPress の「プラグイン」メニューからプラグインを有効化してください

## FAQ

### How do I switch to a user?

As with the User Switching plugin you can still use the “Switch To” link on the 
users overview page – nothing changes there. However the point of this plugin is
that it gives you a Switch to User link in the WordPress admin bar. This reveals
a search box where you can search for a users username. The results of this search
are clickable to “Switch To” that user.

And there is an optional mode where you can use a custom keyboard combination, say‘
su’, and it activates the form where you search for users, and then you can use 
keyboard arrows to navigate the list of results, and the return key to switch to
the selected user. The same combo can be used to focus the ‘Switch Off’ link, following
a return to simulate a click.

### What can be entered into the username search box?

You can enter a user ID, part of / exact username, URL, email, or display name, 
WordPress automatically chooses the best fields to match to based on your input.
[See here for more information on wildcard searches](https://codex.wordpress.org/Class_Reference/WP_User_Query#Search_Parameters).
Clicking submit with nothing in the search box will search all users except the 
current logged in user.

### Has the plugin any filters or actions for developers?

It does indeed, although not too many! The following filters can be used.

 * abus_switch_to_text – allows developers to change the text that is displayed 
   in the admin menu which, when on hover shows the search box
 * abus_form_output – this filter can be used to change the markup of the form which
   is used in the plugin for user searching
 * abus_switch_back_text – this filter is used to change the text shown to switch
   back to the original logged in user
 * abus_switch_to_url – this filter is used to alter the redirect url for different
   users as the filter is passed to switch to user user object
 * abus_ajax_args – this is used to activate the magic word combo as described in
   plugin description, ‘magicWord’ variable can be added to the array to activate
   the feature

## 評価

![](https://secure.gravatar.com/avatar/6cfc8c01f1ea3a75ec6f7dba8f2a014ef4cca4fd63a50fb3c8772e492e472ecc?
s=60&d=retro&r=g)

### 󠀁[Switching Back Easy, Switching To Harder than need be](https://wordpress.org/support/topic/switching-back-easy-switching-to-harder-than-need-be/)󠁿

 [Dennis Bareis](https://profiles.wordpress.org/dbareis/) 2024年6月2日

It is easy to switch back from a switched to account, not so easy to switch away
as a user list is not displayed, you have to search first. Ideally I'd have an option
to choose the accounts and have a button for each.

![](https://secure.gravatar.com/avatar/1357eeb7876812255641bdbbc72148618c45bce3a73af9e2d405e35f6eda45f5?
s=60&d=retro&r=g)

### 󠀁[Good job!](https://wordpress.org/support/topic/good-job-1608/)󠁿

 [neon67](https://profiles.wordpress.org/neon67/) 2022年6月19日

10nx very so much

![](https://secure.gravatar.com/avatar/e39bab2a090afcc4ffc6888823566c5357edc80437d6c729cf7d86e79eb1bb39?
s=60&d=retro&r=g)

### 󠀁[Good Support](https://wordpress.org/support/topic/good-support-496/)󠁿

 [SimpleRick](https://profiles.wordpress.org/keramikoch/) 2021年12月17日

Fast fixing of errors 🙂 Plug-In works like it should

![](https://secure.gravatar.com/avatar/8a03ff342c90e8dda600695d110f37d2adeed82ea12089075fa614a448e619ba?
s=60&d=retro&r=g)

### 󠀁[Идеальный плагин](https://wordpress.org/support/topic/%d0%b8%d0%b4%d0%b5%d0%b0%d0%bb%d1%8c%d0%bd%d1%8b%d0%b9-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd/)󠁿

 [Сергей](https://profiles.wordpress.org/erenbur/) 2020年10月2日

Чувак! Ты сделал идеально работающую вещь! :)))

![](https://secure.gravatar.com/avatar/22dcf41213b58505959c76ae20650595fbd28c9653c683591c3c6f14d60f1aa5?
s=60&d=retro&r=g)

### 󠀁[Could be better](https://wordpress.org/support/topic/could-be-better-31/)󠁿

 [lucasbustamante](https://profiles.wordpress.org/lucasbustamante/) 2018年8月7日
2 replies

Suggestions: Option to show dropdown instead of text input (from personal experience,
most of the time site only have 2~3 users) Dropdown is loosing focus when trying
to click on it, it's kinda annoying Uninstalled it right away, but could be a good
thing with some tweaks.

![](https://secure.gravatar.com/avatar/ef200ee7233d2b56bd663540b5a4770b9934b754fd1981a53f98400d62fcebef?
s=60&d=retro&r=g)

### 󠀁[Perfect!](https://wordpress.org/support/topic/perfect-3919/)󠁿

 [smart.u](https://profiles.wordpress.org/smartu-1/) 2017年4月3日

Perfect! Thank you!

 [ 12件のレビューをすべて表示 ](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/)

## 貢献者と開発者

Admin Bar User Switching はオープンソースソフトウェアです。以下の人々がこのプラグ
インに貢献しています。

貢献者

 *   [ Saad Iqbal ](https://profiles.wordpress.org/saadiqbal/)
 *   [ WPExperts.io ](https://profiles.wordpress.org/wpexpertsio/)

[“Admin Bar User Switching” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/admin-bar-user-switching)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/admin-bar-user-switching/)
するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/admin-bar-user-switching/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/admin-bar-user-switching/)
を [RSS](https://plugins.trac.wordpress.org/log/admin-bar-user-switching/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 1.4 – 2021-17-12

 * Fixed – Fixed Undefined Variable $port.

#### 1.3 – 2021-22-10

 * Fixed – Deprecated error.

#### 1.2 – 2020-02-11

 * Update – WordPress 5.3 compatibility
 * Tweak – Update and modernize the codebase

#### 1.1.1

 * Only enqueue js if the user is logged in
 * Do not seperately enqueue jQuery as it is already stated as a dependency

#### 1.1

 * Add keyboard navigation
 * Add magic-word feature, keyboard-only usage of the plugin
 * Focus search input on clicking the admin-bar button – thanks to [@shadyvb](https://github.com/shadyvb)
   for work on these features
 * Allow search on any user fields rather than just the login or username
 * Make the search query parameters extensible with a filter so developers can easily
   edit them
 * Escape calls to $_POST in the ajax search function

#### 1.0.6

 * Make the capability (edit_users by default) needed to be able to switch to users
   be filterable.

#### 1.0.5

 * Escape instances of add_query_arg in accordance with https://make.wordpress.org/
   plugins/2015/04/20/fixing-add_query_arg-and-remove_query_arg-usage/

#### 1.0.4

 * Correct an issues which could result in a PHP error when the plugin is active
   and the User Switching plugin is not active.
 * Add filter for the switch to redirect url named `abus_switch_to_url` – this allows
   devs to alter the redirect url for different users as the filter is passed to
   switch to user user object.

#### 1.0.3

 * Output styles on both front and backend to make the form look correct when results
   are returned.
 * Create a filter for developers to amend the styles as needed to match their theme
 * Use correct hook for enqueuing javascript file
 * Make sure the current logged in user does not appear in the search results

#### 1.0.2

 * Thanks for @johnbillion for pointing out the incorrect capabilities check for
   switch_to_user. This now checks against edit_user so users who can edit users
   will be the Switch to link.

#### 1.0.1

 * Use switch_to_user user capability instead of is_super_admin when checking whether
   to display Switch to link in admin bar.

#### 1.0

 * Make the Switch to User link reveals a user search box
 * Uses AJAX to populate the user switch to list which therefore makes the plugin
   more compatible for sites with lots of users.

#### 0.1

 * 最初のリリース。

## メタ

 *  バージョン **1.4**
 *  最終更新日 **4年前**
 *  有効インストール数 **2,000+**
 *  WordPress バージョン ** 3.1またはそれ以降 **
 *  検証済み最新バージョン: **6.0.18**
 *  PHP バージョン ** 5.6またはそれ以降 **
 *  言語
 * [English (US)](https://wordpress.org/plugins/admin-bar-user-switching/)
 * タグ
 * [user switching](https://ja.wordpress.org/plugins/tags/user-switching/)[users](https://ja.wordpress.org/plugins/tags/users/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/admin-bar-user-switching/advanced/)

## 評価

 5つ星中4.8つ星

 *  [  10 5-星レビュー     ](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/?filter=5)
 *  [  2 4-星レビュー     ](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/admin-bar-user-switching/reviews/)

## 貢献者

 *   [ Saad Iqbal ](https://profiles.wordpress.org/saadiqbal/)
 *   [ WPExperts.io ](https://profiles.wordpress.org/wpexpertsio/)

## サポート

過去2ヶ月以内に解決した問題:

     0 / 1

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/admin-bar-user-switching/)