WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 10 days ago

#20307 accepted enhancement

Edit User link in admin toolbar

Reported by: johnbillion Owned by: johnbillion
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

When you're viewing an author archive, there should be an 'Edit User' item in the admin toolbar in the same way we have 'Edit {taxonomy}' on taxonomy archives, 'Edit Post' on single posts, etc.

Attachments (4)

20307.patch (1.5 KB) - added by johnbillion 5 years ago.
14787-20307-merge.patch (6.3 KB) - added by georgestephanis 4 years ago.
20307-2.patch (668 bytes) - added by lessbloat 4 years ago.
georgestephanis code, minus "Edit My Profile"
20307.2.patch (1.4 KB) - added by johnbillion 2 months ago.

Download all attachments as: .zip

Change History (28)

@johnbillion
5 years ago

#1 @johnbillion
5 years ago

  • Keywords has-patch added

Patch

Version 0, edited 5 years ago by johnbillion (next)

#2 @nacin
4 years ago

  • Milestone changed from Awaiting Review to 3.5

I could go for this. See #14787 for get_edit_user_link(), which we should definitely have.

#3 @ryan
4 years ago

In [21364]:

Introduce get_edit_user_link(). Props scribu, georgestephanis, johnbillion. fixes #14787 see #20307

#4 @ryan
4 years ago

'Edit My Profile' seems very weird, especially since there is already such a link in the account menu. And 'Edit User' seems of even less utility than the edit taxonomy menu. I guess I'm not a fan of edit menus when viewing archives.

#5 follow-up: @johnbillion
4 years ago

I agree 'Edit My Profile' is a weird one, but I added it for consistency. It can stay or go, I'm more interested in being able to edit other users when I'm on their archive pages.

An 'Edit User' link has no less utlity than an edit link on any other object page, be it a post, a taxonomy term or a user. If an object is editable in WordPress there might as well be a link to edit it whilst you're viewing it.

#6 in reply to: ↑ 5 @DrewAPicture
4 years ago

  • Cc xoodrew@… added

Replying to johnbillion:

An 'Edit User' link has no less utlity than an edit link on any other object page, be it a post, a taxonomy term or a user. If an object is editable in WordPress there might as well be a link to edit it whilst you're viewing it.

That makes good sense. +1

#7 follow-up: @helenyhou
4 years ago

What are we thinking here? Link or no?

If doing the link, let's leave it as "Edit User" whether or not it's yourself. Author archive isn't necessarily your profile, anyway.

#8 in reply to: ↑ 7 @DrewAPicture
4 years ago

It would be nice-to-have. It makes good sense that all other bundled objects seem to have an edit link in the Toolbar.

Replying to helenyhou:

If doing the link, let's leave it as "Edit User" whether or not it's yourself. Author archive isn't necessarily your profile, anyway.

Sounds good.

@lessbloat
4 years ago

georgestephanis code, minus "Edit My Profile"

#9 follow-up: @ryan
4 years ago

I'd still rather remove edit links for archive pages. Edit should be for specific objects only. If I were to pick an admin bar link for an author archive page it would take me to edit.php with that user's posts showing, not the user's profile.

#10 in reply to: ↑ 9 @DrewAPicture
4 years ago

Replying to ryan:

I'd still rather remove edit links for archive pages. Edit should be for specific objects only.

I'd argue in this case we have the unhappy circumstance of the author archive being both A) an archive and B) pretty much the only front-end endpoint where 'Edit User' makes sense. It's really just a matter of abstracting the logic of it. Yes, most archives shouldn't have edit links, but this one should.

#11 @lessbloat
4 years ago

Discussed in IRC: https://irclogs.wordpress.org/chanlog.php?channel=wordpress-ui&day=2012-08-29&sort=asc#m54998

Consensus was to hold off on adding an edit user link for now.

#12 @nacin
4 years ago

  • Milestone 3.5 deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Going to close this as maybelater. I do mean that — maybe opinions will change.

#13 @johnbillion
3 months ago

  • Keywords needs-refresh added
  • Milestone set to Future Release
  • Resolution maybelater deleted
  • Status changed from closed to reopened

#14 @johnbillion
2 months ago

  • Milestone changed from Future Release to 4.7
  • Owner set to johnbillion
  • Status changed from reopened to accepted

I'd like to get this in in conjunction with #38085.

#15 @johnbillion
2 months ago

  • Keywords needs-refresh removed

20307.2.patch adds an Edit User link on the front end, and a corresponding View user link on the user editing screen.

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


2 months ago

#17 @chriscct7
2 months ago

Should this use get_current_user_id() instead of the user_id global?

#18 @johnbillion
2 months ago

Nope because the edit link is for whichever author archive you're viewing -- not the current logged in user.

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


7 weeks ago

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


7 weeks ago

#22 @johnbillion
6 weeks ago

  • Keywords needs-unit-tests added
  • Milestone changed from 4.7 to Future Release

This ticket was mentioned in Slack in #forums by sergey. View the logs.


10 days ago

#24 @johnjamesjacoby
10 days ago

20307.2.patch looks OK to me.

Note: See TracTickets for help on using tickets.