Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#8508 closed enhancement (fixed)

Nickname improvement

Reported by: futurix Owned by: mattwalters
Milestone: 2.8 Priority: low
Severity: minor Version: 2.7
Component: UI Keywords: has-patch tested commit
Focuses: Cc:


Currently when you change your nickname in profile, you have to save profile to get new nickname as option in the "Display name publicly as" field. It would be great to have some AJAX or plain JS magic to update that without reloading page.

Attachments (1)

display_name_update.diff (1.4 KB) - added by mattwalters 7 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 @mattwalters7 years ago

  • Owner set to mattwalters
  • Status changed from new to assigned

comment:2 @mattwalters7 years ago

  • Keywords has-patch added
  • Resolution set to fixed
  • Status changed from assigned to closed

It looked like there was already code in user-edit.php to handle updating the nickname, however it didn't account for first name and last name changes. Seems if we're going to handle one case, we might as handle all three.

I removed the extra function for updating the nickname and added to the $(document).ready() function to handle updating the select box based on the first name, last name, and nickname changing.

comment:3 @mattwalters7 years ago

  • Cc mwalters8@… added
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 @mattwalters7 years ago

  • Cc mattwalters added; mwalters8@… removed

comment:5 @mattwalters7 years ago

  • Milestone changed from 2.8 to 2.7.1

comment:6 @ryan7 years ago

  • Milestone changed from 2.7.1 to 2.8

comment:7 @janeforshort7 years ago

If the patch works, let's drop it in for 2.8. Instant updating would be great for users who don't think to scroll up or down and click save.

comment:8 @Nicholas916 years ago

  • Cc dragos.nicholas@… added
  • Keywords tested added

Tested on Ubuntu, in Firefox and Opera. MattWalters has done a great job with this patch.

comment:9 @Denis-de-Bernardy6 years ago

  • Keywords commit added

comment:10 @markjaquith6 years ago

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

(In [11065]) Dynamically update display name as its components are updated in the profile. props to mattwalters for the original patch. fixes #8508

comment:11 @hallsofmontezuma6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Check for duplicates before adding to the dropdown. For instance, if you have-

Username: John
First Name: John
Last Name: Smith
Nickname: John

You'll have-

Display Name Publicly as

John Smith
Smith John

comment:12 follow-up: @thee176 years ago

I think that should be opened as a different ticket so this can be closed in 2.8 and have this fix in 2.8.1

comment:13 in reply to: ↑ 12 @azaozz6 years ago

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

Replying to thee17:
Yes, also the js for this has been moved to user-profile.js.

Note: See TracTickets for help on using tickets.