Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11332 closed defect (bug) (fixed)

Filters in the admin header

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

I know that we'll be looking into changes needed for the header for the MU merge after 2.9 ships, however, I think it'd be very useful to add some hooks to the header now..

Occasionally plugins have a need to add content to the headerbar, be it adding an extra section beside whats there, or modifying it. I've seen some plugins use Javascript to achieve this so far, and another using the favourite actions filter as an action to output its content before the dropdown was displayed..

I'd like to propose 2 new filters:

  1. in_admin_header - allows adding extra content to the header
  2. admin_user_info_links - Filters the Hello, user | Turbo | Logout links

The first would be useful for plugins to add a div or anything else to the header section, The latter as being rather useful for user-related plugins, giving them the ability to perform other tasks straight from there (In my case, A link to jump to super-user mode)

Any feedback on them is appreciated, I was surprised to find that there were no filters in this section of the document yet.

Attachments (1)

11332.diff (1.5 KB) - added by dd32 15 years ago.

Download all attachments as: .zip

Change History (5)

@dd32
15 years ago

#1 @strider72
15 years ago

I can certainly think of a use case where I could use a custom dropdown similar to the Favorite Actions dropdown....

#2 follow-up: @westi
15 years ago

  • Milestone changed from 2.9 to 3.0

I like this idea.

I think we have other tickets for similar things.

I don't think we should do this late in the dev cycle - we need to make sure we get it right and don't have a solution developed too quickly.

#3 in reply to: ↑ 2 @nacin
15 years ago

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

Replying to westi:

I don't think we should do this late in the dev cycle - we need to make sure we get it right and don't have a solution developed too quickly.

I think this patch is good as it stands. Clean it up and get it in?

#4 @dd32
15 years ago

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

(In [13497]) Add some filters to the Admin header. Fixes #11332

Note: See TracTickets for help on using tickets.