Make WordPress Core

Opened 12 years ago

Closed 7 years ago

#20307 closed enhancement (fixed)

Edit User link in admin toolbar

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 4.9 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 12 years ago.
14787-20307-merge.patch (6.3 KB) - added by georgestephanis 12 years ago.
20307-2.patch (668 bytes) - added by lessbloat 12 years ago.
georgestephanis code, minus "Edit My Profile"
20307.2.patch (1.4 KB) - added by johnbillion 7 years ago.

Download all attachments as: .zip

Change History (30)

@johnbillion
12 years ago

#1 @johnbillion
12 years ago

  • Keywords has-patch added

Patch

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

#2 @nacin
12 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
12 years ago

In [21364]:

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

#4 @ryan
12 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
12 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
12 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
12 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
12 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
12 years ago

georgestephanis code, minus "Edit My Profile"

#9 follow-up: @ryan
12 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
12 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
11 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
11 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
7 years ago

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

#14 @johnbillion
7 years 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.

@johnbillion
7 years ago

#15 @johnbillion
7 years 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.


7 years ago

#17 @chriscct7
7 years ago

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

#18 @johnbillion
7 years 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 years ago

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


7 years ago

#22 @johnbillion
7 years 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.


7 years ago

#24 @johnjamesjacoby
7 years ago

20307.2.patch looks OK to me.

#25 @johnbillion
7 years ago

  • Milestone changed from Future Release to 4.9

#26 @johnbillion
7 years ago

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

In 41159:

Toolbar: Add View User and Edit User links to the admin toolbar to ease navigation between a user's archives and the user editing screen.

Props georgestephanis, lessbloat, johnbillion

Fixes #20307

Note: See TracTickets for help on using tickets.