Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#50312 closed enhancement (fixed)

Add View Post link to Admin Bar of Edit Comments page when viewing comments for a single post.

Reported by: otto42's profile Otto42 Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Toolbar Keywords:
Focuses: administration Cc:

Description

When viewing the comments page for a single post, such as this:

/wp-admin/edit-comments.php?p=123

The admin bar should have a "View Post" link to view that post specifically. It helps with context to be able to view the post without having to look for the link. This is similar to the View Post link in the Editor or whenever otherwise viewing a single post.

First draft patch to add a simple link attached.

Attachments (1)

50312.diff (1003 bytes) - added by Otto42 5 years ago.
Add view post link to edit comments page

Download all attachments as: .zip

Change History (8)

@Otto42
5 years ago

Add view post link to edit comments page

#1 @matt
5 years ago

This is a request from me! Would love if we can get this tweak in.

#2 @SergeyBiryukov
5 years ago

  • Component changed from Administration to Toolbar
  • Focuses administration added
  • Milestone changed from Awaiting Review to 5.5

#3 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
5 years ago

50312.diff is a good start, but there is an existing code for displaying the "View Post" link that respects the post type object's public and show_in_admin_bar properties, as well as the post status. So it seems better to reuse that existing code instead of duplicating it. Commit incoming.

#5 @SergeyBiryukov
5 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47903:

Toolbar: Display a "View Post" link when viewing comments for a single post on Comments screen.

Props Otto42, matt, SergeyBiryukov.
Fixes #50312.

#6 @davidbaumwald
5 years ago

Confirmed with @SergeyBiryukov that the DocBlock above the function should be updated with the added global. He says another small commit is expected.

#7 @SergeyBiryukov
5 years ago

In 47906:

Docs: Add missing @global reference for the $post_id global in wp_admin_bar_edit_menu().

Follow-up to [47903].

Props davidbaumwald.
See #50312.

Note: See TracTickets for help on using tickets.