Skip to content

Open "Visit Site" / "View Site" links in a new tab from the admin #79066

@369work

Description

@369work

What's the problem?

Two "view the front end" links in the WordPress admin currently open in the same tab, interrupting the admin workflow in distinct but predictable ways:

1. Admin bar — "Visit Site" (under the site name menu)

Admins frequently click this to quickly verify the front end while working in the admin. Because it opens in the same tab, users who want to keep their admin context are forced to right-click and choose "Open link in new tab" every single time — a repetitive, unnecessary friction point.

2. Appearance > Themes — "View Site" link

The natural next step after installing or activating a theme is to check how the front end looks. At that moment, the admin is still on the Themes page and will almost certainly want to return to it (to continue configuring, switch themes, or activate plugins). Opening in the same tab discards that context unnecessarily.

Why target="_blank" is appropriate here

Unlike content-area links — where enforcing target="_blank" is debated on accessibility grounds — these are admin UI controls whose sole purpose is side-by-side verification. The intent is always "let me check the front end while staying in the admin." The existing "Preview" button already follows this pattern by opening in a new tab, setting a clear precedent.

Proposed change

Add target="_blank" rel="noopener noreferrer" to:

  • The view-site node in wp_admin_bar_site_menu() (wp-includes/admin-bar.php) via its meta array
  • The "View Site" link in the Gutenberg Themes page UI

This is a small, low-risk change that removes daily friction for every WordPress admin.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] WP Core TicketRequires an upstream change from WordPress. Core Trac ticket should be linked.

    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