Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19426 closed defect (bug) (fixed)

Need to support old admin bar node ID my-account-with-avatar

Reported by: nacin's profile nacin Owned by: ryan's profile ryan
Milestone: 3.3 Priority: high
Severity: normal Version: 3.3
Component: Toolbar Keywords: has-patch commit needs-refresh dev-reviewed
Focuses: Cc:

Description

In 3.2, the my account ID varied from my-account-with-avatar to my-account, depending on whether avatars were enabled. This was moved to classes in 3.3 where it belongs.

Unfortunately plugins may have been using my-account-with-avatar. We need to preserve these mappings.

A quick search of the directory found BuddyPress was among the plugins that did this. And smartly, for that matter -- $bp->my_account_menu_id = ( ! empty( $avatar ) ) ? 'my-account-with-avatar' : 'my-account';.

Patch incoming.

Attachments (5)

19426.diff (879 bytes) - added by nacin 13 years ago.
19426.2.diff (880 bytes) - added by nacin 13 years ago.
Adds period.
19426.3.diff (936 bytes) - added by nacin 13 years ago.
Refreshed after #19429.
19426.4.diff (935 bytes) - added by nacin 13 years ago.
19426.5.diff (878 bytes) - added by ryan 13 years ago.

Download all attachments as: .zip

Change History (18)

#1 @nacin
13 years ago

This would revive the mapping concept proposed in #19245. But the binding code is no longer the proper place for it. add_node() it is.

#2 @nacin
13 years ago

I checked all of the IDs in 3.2 and the only other one is my-blogs to my-sites. Of note, blog-{$id} and blog-{$id}-* still work. BuddyPress and a few other plugins were using my-blogs.

@nacin
13 years ago

#3 @nacin
13 years ago

  • Keywords has-patch added
  • Version set to 3.3

#4 @koopersmith
13 years ago

Tested. Looks good to me.

@nacin
13 years ago

Adds period.

#5 @nacin
13 years ago

  • Keywords commit added

#6 @nacin
13 years ago

Per #19429, we're going to want to map 'my-account' and 'my-account-with-avatar' to 'account'.

@nacin
13 years ago

Refreshed after #19429.

#7 @nacin
13 years ago

duck_ has pointed out that the first and third sprintf() arguments need to be reversed.

#8 @johnbillion
13 years ago

  • Cc johnbillion@… added

@nacin
13 years ago

#9 @ryan
13 years ago

Okay.

#10 @nacin
13 years ago

  • Keywords needs-refresh dev-reviewed added

Needs refresh, s/account/my-account/g.

#11 @azaozz
13 years ago

Looks good.

@ryan
13 years ago

#12 @ryan
13 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19555]:

Add back compat support for my-account-with-avatar admin bar node id. fixes #19426

#13 @ryan
13 years ago

In [19556]:

Don't drop dollars. see #19426

Note: See TracTickets for help on using tickets.