Floating Button
A floating button fixed to the admin screen allows quick-searching and switching to any user without navigating to the user list.
Navigate to SwitchGuard → Settings → Floating Button.
Settings
| Setting | Default | Description |
|---|---|---|
| Enable Floating Button | Yes | Show the floating button in WP admin |
| Button Label | Switch User | Text label on the button |
| Button Position | Bottom Right | Screen position: bottom-right, bottom-left, top-right, top-left |
| Button Color | #2E266D | Background colour (hex) |
Using the Floating Button
- Click the floating button in any admin screen.
- A modal opens with a live user search field.
- Type a name or email - results populate via AJAX.
- Click a user to switch to them immediately.
The AJAX search endpoint (wp_ajax_switchguard_search_users) returns users matching the query, filtered by your switching permissions (role hierarchy enforcement applies).