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: |
|
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)
Change History (14)
#2
@
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
@
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
@
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.
#8
@
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' );
possible patch