Make WordPress Core

Opened 7 years ago

Closed 17 months ago

#40564 closed enhancement (wontfix)

Show user login name in posts/pages list to avoid confusion if identical names exist

Reported by: presskopp's profile Presskopp Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.4
Component: Posts, Post Types Keywords: has-patch has-screenshots close
Focuses: administration Cc:

Description

Assume there are multiple users with different username, but both the same public name.

The posts/pages list (which is controlled by class-wp-posts-list-table.php) will show the Author twice (or more) under the identical name. I wonder if it would be helpful to (also) show the real username (in brackets) so this can be avoided.

Compare to when setting an author of a post - it will be there already.

This ticket is to open discussion if this is useful or not, and how it would be implemented in a manner so it's helping information and not overload. Thank you.

Attachments (4)

original.jpg (51.6 KB) - added by Presskopp 7 years ago.
patched.jpg (53.2 KB) - added by Presskopp 7 years ago.
author.jpg (21.1 KB) - added by Presskopp 7 years ago.
40564.diff (584 bytes) - added by Presskopp 7 years ago.

Download all attachments as: .zip

Change History (14)

@Presskopp
7 years ago

@Presskopp
7 years ago

@Presskopp
7 years ago

@Presskopp
7 years ago

#1 @Presskopp
7 years ago

  • Keywords has-patch has-screenshots added

possible patch

#2 @Presskopp
7 years ago

  • Summary changed from Show user login name in posts/pages list to Show user login name in posts/pages list to avoid confusion if identical names exist

This ticket was mentioned in Slack in #core by presskopp. View the logs.


7 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


7 years ago

#5 @SergeyBiryukov
7 years ago

  • Component changed from General to Posts, Post Types
  • Focuses administration added
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @jorbin
7 years ago

  • Focuses administration removed

My initial reaction is that this feels like plugin territory and we might be better off with a filter in get_edit_link. It seems like it would be an edge case.

#7 @jorbin
7 years ago

  • Focuses administration added

#8 @SergeyBiryukov
6 years ago

  • Keywords close added
  • Owner SergeyBiryukov deleted

I agree with @jorbin, it does seem a bit like an edge case.

We could add a filter to WP_Posts_List_Table::get_edit_link(), but that would be inconsistent with WP_Media_List_Table, which doesn't have a corresponding method.

That said, both WP_Posts_List_Table and WP_Media_List_Table use get_the_author() to display the author name, so adding a user login there is already doable via the_author filter:

function wp40564_add_user_login_to_author_name_in_admin( $display_name ) {
	global $authordata;

	if ( is_admin() && is_object( $authordata ) ) {
		$display_name = sprintf( '%s (%s)', $display_name, $authordata->user_login );
	}

	return $display_name;
}
add_filter( 'the_author', 'wp40564_add_user_login_to_author_name_in_admin' );

#10 @JeffPaul
17 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

Given that there's not additional requests for this or a single plugin dev commenting here looking for a filter to do this, I'm going to close this as wontfix.

Note: See TracTickets for help on using tickets.