Skip to content

Command Palette: Add "Log Out" command #76457

@courtneyr-dev

Description

@courtneyr-dev

What problem does this address?

The Command Palette currently lacks a log out command. Users who rely heavily on keyboard-driven workflows must leave the editor context entirely to log out — typically navigating to the admin bar or a separate screen. This breaks flow for power users and is inconsistent with the Command Palette's goal of surfacing common admin actions without context-switching.

As the Command Palette expands beyond the block editors into the broader wp-admin (tracked in #58218), user-account actions like logging out become an increasingly natural fit.

Proposed solution

Add a "Log Out" command to the Command Palette's core command set. Selecting it would redirect the user to the WordPress logout URL (wp-login.php?action=logout with the appropriate nonce).

Expected behavior:

  • Typing "log out" or "logout" in the Command Palette surfaces the command
  • Selecting it logs the user out and redirects to the login screen
  • The command is available globally (not scoped to a specific editor context)

Why this belongs in core

Log Out is already accessible via the admin bar — a core navigation element. The Command Palette should reflect parity with the admin bar's top-level actions. Other keyboard-centric tools (VS Code, Linear, Notion) treat session management as a first-class palette command.

Implementation notes

The command would likely live in packages/core-commands alongside other site-wide admin commands. The logout URL can be generated via wp_logout_url() on the PHP side and passed as a localized variable, consistent with how other admin URLs are handled.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions