WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#17740 closed defect (bug) (fixed)

Make "Howdy" filterable

Reported by: trepmal Owned by: ryan
Milestone: 3.2 Priority: normal
Severity: minor Version: 3.2
Component: General Keywords: has-patch
Focuses: Cc:

Description

Prior to 3.2, "Howdy" was filterable through the admin_user_info_links hook, but with new dropdown, it can no longer be filtered.
As much as I love Howdy, I think it makes sense that it should remain filterable.

Attachments (4)

admin-header.2.diff (527 bytes) - added by trepmal 4 years ago.
keeps Howdy in the filterable $links array
admin-header.3.diff (527 bytes) - added by trepmal 4 years ago.
keeps Howdy in the filterable $links array (and doesn't change other keys!)
admin-bar.diff (1.0 KB) - added by trepmal 4 years ago.
correct version
admin-header.diff (1.3 KB) - added by trepmal 4 years ago.
really the correct version (shoot me now)

Download all attachments as: .zip

Change History (11)

comment:1 @nacin4 years ago

  • Milestone changed from Awaiting Review to 3.2

Hmm.

I'm wondering if the Howdy part should become $links[0], then passed through the existing hook, then via array_shift() we remove the first value and use that as our Howdy.

Perhaps it should actually be $links[5], but we always splice $links[5] off and put it at the beginning. That way anyone previously filtering $links[5] would keep that, but if they added a link in 0-4, it wouldn't become the title of the dropdown.

Let's be as back compat as possible. Maybe someone can grep the plugins directory to see how it's currently being used to get an idea.

comment:2 @nacin4 years ago

  • Type changed from feature request to defect (bug)

comment:3 @trepmal4 years ago

Part of the reason I noticed "Howdy" wasn't filterable any more was that one of my plugins wasn't working fully when I put it through the 3.2 test

"Howdy Tweaks" Here's the source: http://plugins.trac.wordpress.org/browser/howdy-tweaks/trunk/howdy-greeting-tweaks.php

@trepmal4 years ago

keeps Howdy in the filterable $links array

@trepmal4 years ago

keeps Howdy in the filterable $links array (and doesn't change other keys!)

comment:4 @trepmal4 years ago

sorry - realized I uploaded the wrong thing... twice

I'm still learning :) I'll fix it momentarily

@trepmal4 years ago

correct version

@trepmal4 years ago

really the correct version (shoot me now)

comment:5 @jane4 years ago

Howdy shouldn't have been linked in the first place for the dropdown, just the name.

comment:6 @ryan4 years ago

Some, at least, expect it in position 5. Let's just put it back at 5 and shift it off later as in admin-header.diff. If a plugin puts things before howdy in the array, the plugin will just have to adapt to the new reality.

comment:7 @ryan4 years ago

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

In [18232]:

Add Howdy back to the admin_user_info_links filtered array. Props trepmal. fixes #17740

Note: See TracTickets for help on using tickets.